Ajout du nom du contact sur la popup de reception des SMS
This commit is contained in:
parent
804f8379e9
commit
e49141c747
|
@ -67,6 +67,16 @@
|
||||||
global $db;
|
global $db;
|
||||||
$now = new DateTime();
|
$now = new DateTime();
|
||||||
$receiveds = $db->getReceivedsSince($now->format('Y-m-d'));
|
$receiveds = $db->getReceivedsSince($now->format('Y-m-d'));
|
||||||
|
|
||||||
|
foreach ($receiveds as $key => $received)
|
||||||
|
{
|
||||||
|
if (!$contacts = $db->getFromTableWhere('contacts', ['number' => $received['send_by']]))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$receiveds[$key]['send_by'] = $contacts[0]['name'] . ' (' . $received['send_by'] . ')';
|
||||||
|
}
|
||||||
|
|
||||||
$nbReceiveds = count($receiveds);
|
$nbReceiveds = count($receiveds);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue