Add unread messages support

This commit is contained in:
osaajani 2019-12-02 01:55:06 +01:00
parent cfde77a0c1
commit 88b00e4e9f
12 changed files with 249 additions and 15 deletions

View file

@ -107,6 +107,11 @@ namespace controllers\publics;
foreach ($receiveds as $received)
{
if ($received['status'] != 'read')
{
$this->internal_received->mark_as_read_for_user($id_user, $received['id']);
}
$messages[] = [
'date' => htmlspecialchars($received['at']),
'text' => htmlspecialchars($received['text']),