diff options
author | Joas Schilling <coding@schilljs.com> | 2020-10-30 16:03:37 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2020-11-26 11:46:43 +0300 |
commit | 459858a69527311bf60ffa553d45ba2a7eeec032 (patch) | |
tree | a25ef253ccc64b9b8da3e7c7597a55c8495f3c4f /lib/Model | |
parent | 89f3f351962c2183d1cfeadedd2b6916d7958bc3 (diff) |
Introduce constants for the actor types
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/Model')
-rw-r--r-- | lib/Model/Attendee.php | 4 | ||||
-rw-r--r-- | lib/Model/Message.php | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/lib/Model/Attendee.php b/lib/Model/Attendee.php index 121139d15..8725c365d 100644 --- a/lib/Model/Attendee.php +++ b/lib/Model/Attendee.php @@ -51,6 +51,10 @@ use OCP\AppFramework\Db\Entity; */ class Attendee extends Entity { + public const ACTOR_USERS = 'users'; + public const ACTOR_GUESTS = 'guests'; + public const ACTOR_EMAILS = 'emails'; + /** @var int */ protected $roomId; diff --git a/lib/Model/Message.php b/lib/Model/Message.php index 6d54f04c5..97d578c18 100644 --- a/lib/Model/Message.php +++ b/lib/Model/Message.php @@ -158,7 +158,7 @@ class Message { public function isReplyable(): bool { return $this->getMessageType() !== 'system' && $this->getMessageType() !== 'command' && - \in_array($this->getActorType(), ['users', 'guests']); + \in_array($this->getActorType(), [Attendee::ACTOR_USERS, Attendee::ACTOR_GUESTS]); } public function toArray(): array { |