Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/spreed.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Petry <vincent@nextcloud.com>2020-12-02 15:55:24 +0300
committerVincent Petry <vincent@nextcloud.com>2020-12-11 20:15:48 +0300
commit65238d1b8f487596dc79b19fe6a6be3a4fb417be (patch)
treedf44da5a069d248766065a21f66e76725c98b1eb /lib/Room.php
parent353206e1e695d531f2a51003ac93cfc3cd669bce (diff)
Adjustments for listable rooms after review
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Diffstat (limited to 'lib/Room.php')
-rw-r--r--lib/Room.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/Room.php b/lib/Room.php
index 7a3cf2885..e371631c5 100644
--- a/lib/Room.php
+++ b/lib/Room.php
@@ -65,10 +65,10 @@ class Room {
/**
* Only visible when joined
*/
- public const LISTABLE_PARTICIPANTS = 0;
+ public const LISTABLE_NONE = 0;
/**
- * Searchable by all regular users and moderators, even when not joined, excluding guest users
+ * Searchable by all regular users and moderators, even when not joined, excluding users from the guest app
*/
public const LISTABLE_USERS = 1;
@@ -818,11 +818,15 @@ class Room {
return true;
}
- if (!in_array($this->getType(), [self::GROUP_CALL, self::PUBLIC_CALL, self::CHANGELOG_CONVERSATION], true)) {
+ if (!in_array($this->getType(), [self::GROUP_CALL, self::PUBLIC_CALL], true)) {
return false;
}
- if ($newState < 0 || $newState > 3) {
+ if (!in_array($newState, [
+ Room::LISTABLE_NONE,
+ Room::LISTABLE_USERS,
+ Room::LISTABLE_ALL,
+ ], true)) {
return false;
}