refactor all media create to centralise copy of medias and save, etc.

This commit is contained in:
osaajani 2021-03-26 23:32:29 +01:00
parent 92146ba8e1
commit 04a40049ce
18 changed files with 400 additions and 367 deletions

View file

@ -181,7 +181,7 @@ class Phone extends AbstractDaemon
foreach ($response['smss'] as $sms)
{
$this->logger->info('Receive message : ' . json_encode($sms));
$response = $internal_received->receive($this->phone['id_user'], $this->phone['id'], $sms['text'], $sms['origin']);
$response = $internal_received->receive($this->phone['id_user'], $this->phone['id'], $sms['text'], $sms['origin'], $sms['at'], \models\Received::STATUS_UNREAD, $sms['mms'] ?? false, $sms['medias'] ?? []);
if ($response['error'])
{