mirror of
https://github.com/RaspbianFrance/raspisms.git
synced 2025-04-21 08:56:27 +02:00
Update phone to use name instead of number and update sended to use phone id instead of origin
This commit is contained in:
parent
62c7f69395
commit
d5be760843
12 changed files with 91 additions and 93 deletions
|
@ -141,7 +141,7 @@ class Phone extends AbstractDaemon
|
|||
|
||||
$message['at'] = $at;
|
||||
|
||||
$message['origin'] = $this->phone['number'];
|
||||
$message['id_phone'] = $this->phone['id'];
|
||||
|
||||
$this->logger->info('Try send message : ' . json_encode($message));
|
||||
|
||||
|
@ -149,7 +149,7 @@ class Phone extends AbstractDaemon
|
|||
if (!$sended_sms_uid)
|
||||
{
|
||||
$this->logger->error('Failed send message : ' . json_encode($message));
|
||||
$internal_sended->create($this->phone['id_user'], $at, $message['text'], $message['origin'], $message['destination'], $sended_sms_uid, $this->phone['adapter'], $message['flash'], 'failed');
|
||||
$internal_sended->create($this->phone['id_user'], $this->phone['id'], $at, $message['text'], $message['destination'], $sended_sms_uid, $this->phone['adapter'], $message['flash'], 'failed');
|
||||
|
||||
continue;
|
||||
}
|
||||
|
@ -161,7 +161,7 @@ class Phone extends AbstractDaemon
|
|||
|
||||
$this->logger->info('Successfully send message : ' . json_encode($message));
|
||||
|
||||
$internal_sended->create($this->phone['id_user'], $at, $message['text'], $message['origin'], $message['destination'], $sended_sms_uid, $this->phone['adapter'], $message['flash']);
|
||||
$internal_sended->create($this->phone['id_user'], $this->phone['id'], $at, $message['text'], $message['destination'], $sended_sms_uid, $this->phone['adapter'], $message['flash']);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue