diff options
author | Joas Schilling <coding@schilljs.com> | 2020-12-04 14:58:51 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2020-12-10 13:47:04 +0300 |
commit | 6eefd9c3fae1d66d3a277f0b1e3d2a8e3a02418c (patch) | |
tree | 29877b541d8bbe3e7103a06e86e80a61657a7457 /lib/Model | |
parent | 11e8e28b87467954546ed5c5acf7ad78b38ec8f3 (diff) |
Save the read privacy on the attendee model too, so we can select-query it easier later on
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 |
2 files changed, 8 insertions, 0 deletions
diff --git a/lib/Model/Attendee.php b/lib/Model/Attendee.php index 3189ede37..302dcc447 100644 --- a/lib/Model/Attendee.php +++ b/lib/Model/Attendee.php @@ -48,6 +48,8 @@ use OCP\AppFramework\Db\Entity; * @method int getLastReadMessage() * @method void setLastMentionMessage(int $lastMentionMessage) * @method int getLastMentionMessage() + * @method void setReadPrivacy(int $readPrivacy) + * @method int getReadPrivacy() */ class Attendee extends Entity { public const ACTOR_USERS = 'users'; @@ -87,6 +89,9 @@ class Attendee extends Entity { /** @var int */ protected $lastMentionMessage; + /** @var int */ + protected $readPrivacy; + public function __construct() { $this->addType('roomId', 'int'); $this->addType('actorType', 'string'); @@ -99,6 +104,7 @@ class Attendee extends Entity { $this->addType('lastJoinedCall', 'int'); $this->addType('lastReadMessage', 'int'); $this->addType('lastMentionMessage', 'int'); + $this->addType('readPrivacy', 'int'); } /** @@ -118,6 +124,7 @@ class Attendee extends Entity { 'last_joined_call' => $this->getLastJoinedCall(), 'last_read_message' => $this->getLastReadMessage(), 'last_mention_message' => $this->getLastMentionMessage(), + 'read_privacy' => $this->getReadPrivacy(), ]; } } diff --git a/lib/Model/AttendeeMapper.php b/lib/Model/AttendeeMapper.php index d071c753c..13d7d6d07 100644 --- a/lib/Model/AttendeeMapper.php +++ b/lib/Model/AttendeeMapper.php @@ -126,6 +126,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'], + 'read_privacy' => (int) $row['read_privacy'], ]); } } |