diff options
author | Joas Schilling <coding@schilljs.com> | 2021-09-01 18:28:19 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2021-09-20 13:51:19 +0300 |
commit | bf6150be9549813459f26a92cfafaa114331cebe (patch) | |
tree | 68ec559bba93f0198cfc79fdb19111ab435f268d /lib/Model | |
parent | 9aff2302dfc1f94c607e0296ca14a620c2758cdb (diff) |
Add a counter for the direct mentions
This allows the UI can show the user bubble depending on user vs. all mentions
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/Model')
-rw-r--r-- | lib/Model/Attendee.php | 7 | ||||
-rw-r--r-- | lib/Model/AttendeeMapper.php | 1 | ||||
-rw-r--r-- | lib/Model/SelectHelper.php | 1 |
3 files changed, 9 insertions, 0 deletions
diff --git a/lib/Model/Attendee.php b/lib/Model/Attendee.php index e0de04da1..c98f36ae2 100644 --- a/lib/Model/Attendee.php +++ b/lib/Model/Attendee.php @@ -47,6 +47,8 @@ use OCP\AppFramework\Db\Entity; * @method int getLastReadMessage() * @method void setLastMentionMessage(int $lastMentionMessage) * @method int getLastMentionMessage() + * @method void setLastMentionDirect(int $lastMentionDirect) + * @method int getLastMentionDirect() * @method void setReadPrivacy(int $readPrivacy) * @method int getReadPrivacy() * @method void setPublishingPermissions(int $publishingPermissions) @@ -105,6 +107,9 @@ class Attendee extends Entity { protected $lastMentionMessage; /** @var int */ + protected $lastMentionDirect; + + /** @var int */ protected $readPrivacy; /** @var int */ @@ -128,6 +133,7 @@ class Attendee extends Entity { $this->addType('lastJoinedCall', 'int'); $this->addType('lastReadMessage', 'int'); $this->addType('lastMentionMessage', 'int'); + $this->addType('lastMentionDirect', 'int'); $this->addType('readPrivacy', 'int'); $this->addType('publishingPermissions', 'int'); $this->addType('accessToken', 'string'); @@ -155,6 +161,7 @@ class Attendee extends Entity { 'last_joined_call' => $this->getLastJoinedCall(), 'last_read_message' => $this->getLastReadMessage(), 'last_mention_message' => $this->getLastMentionMessage(), + 'last_mention_direct' => $this->getLastMentionDirect(), 'read_privacy' => $this->getReadPrivacy(), 'publishing_permissions' => $this->getPublishingPermissions(), 'access_token' => $this->getAccessToken(), diff --git a/lib/Model/AttendeeMapper.php b/lib/Model/AttendeeMapper.php index 1c689805b..261b949b0 100644 --- a/lib/Model/AttendeeMapper.php +++ b/lib/Model/AttendeeMapper.php @@ -174,6 +174,7 @@ class AttendeeMapper extends QBMapper { 'last_joined_call' => (int) $row['last_joined_call'], 'last_read_message' => (int) $row['last_read_message'], 'last_mention_message' => (int) $row['last_mention_message'], + 'last_mention_direct' => (int) $row['last_mention_direct'], 'read_privacy' => (int) $row['read_privacy'], 'publishing_permissions' => (int) $row['publishing_permissions'], 'access_token' => (string) $row['access_token'], diff --git a/lib/Model/SelectHelper.php b/lib/Model/SelectHelper.php index 0ba06d2ad..a42097f6e 100644 --- a/lib/Model/SelectHelper.php +++ b/lib/Model/SelectHelper.php @@ -69,6 +69,7 @@ class SelectHelper { ->addSelect($alias . 'last_joined_call') ->addSelect($alias . 'last_read_message') ->addSelect($alias . 'last_mention_message') + ->addSelect($alias . 'last_mention_direct') ->addSelect($alias . 'read_privacy') ->addSelect($alias . 'publishing_permissions') ->addSelect($alias . 'access_token') |