Add a new webhook for sended sms status change. Add status and originating scheduled's id to webhook send_sms

This commit is contained in:
osaajani 2021-10-18 03:40:06 +02:00
parent ec108d8543
commit d0fa0a299c
13 changed files with 91 additions and 25 deletions

View file

@ -139,14 +139,14 @@ class Phone extends AbstractDaemon
//Do message sending
$this->logger->info('Try send message : ' . json_encode($message));
$response = $internal_sended->send($this->adapter, $this->phone['id_user'], $this->phone['id'], $message['text'], $message['destination'], $message['flash'], $message['mms'], $message['medias']);
$response = $internal_sended->send($this->adapter, $this->phone['id_user'], $this->phone['id'], $message['text'], $message['destination'], $message['flash'], $message['mms'], $message['medias'], $message['id_scheduled']);
if ($response['error'])
{
$this->logger->error('Failed send message : ' . json_encode($message) . ' with error : ' . $response['error_message']);
continue;
}
$this->logger->info('Successfully send message : ' . json_encode($message));
}
}