diff options
author | Joas Schilling <coding@schilljs.com> | 2018-07-30 11:49:36 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2018-07-31 17:47:43 +0300 |
commit | 36ae3a3e5561c9ac27c5c8827d5815776997fa3a (patch) | |
tree | 19e094330084ab7786c08d0e96b5fb107d124e51 /lib/Room.php | |
parent | fe64e046aa3a9fa297e3a142ec9fa7beb64f86bc (diff) |
Highlight the unread count only for mentions
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/Room.php')
-rw-r--r-- | lib/Room.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/Room.php b/lib/Room.php index 4b8f61dbe..82df4eaff 100644 --- a/lib/Room.php +++ b/lib/Room.php @@ -863,6 +863,15 @@ class Room { return isset($row['num_participants']) ? (int) $row['num_participants'] : 0; } + public function markUsersAsMentioned(array $userIds, \DateTime $time) { + $query = $this->db->getQueryBuilder(); + $query->update('talk_participants') + ->set('last_mention', $query->createNamedParameter($time, 'datetime')) + ->where($query->expr()->eq('room_id', $query->createNamedParameter($this->getId(), IQueryBuilder::PARAM_INT))) + ->andWhere($query->expr()->in('user_id', $query->createNamedParameter($userIds, IQueryBuilder::PARAM_STR_ARRAY))); + $query->execute(); + } + /** * @param string $userId * @param string $sessionId |