diff options
Diffstat (limited to 'lib/private')
-rw-r--r-- | lib/private/UserStatus/ISettableProvider.php | 11 | ||||
-rw-r--r-- | lib/private/UserStatus/Manager.php | 8 |
2 files changed, 19 insertions, 0 deletions
diff --git a/lib/private/UserStatus/ISettableProvider.php b/lib/private/UserStatus/ISettableProvider.php index fc0d502845e..88a107d1f86 100644 --- a/lib/private/UserStatus/ISettableProvider.php +++ b/lib/private/UserStatus/ISettableProvider.php @@ -52,4 +52,15 @@ interface ISettableProvider extends IProvider { * @param string $status The expected current status. */ public function revertUserStatus(string $userId, string $messageId, string $status): void; + + /** + * Revert an automatically set user status. For example after leaving a call, + * change back to the previously set status. If the user has already updated + * their status, this method does nothing. + * + * @param string[] $userIds The users for which we want to update the status. + * @param string $messageId The expected current messageId. + * @param string $status The expected current status. + */ + public function revertMultipleUserStatus(array $userIds, string $messageId, string $status): void; } diff --git a/lib/private/UserStatus/Manager.php b/lib/private/UserStatus/Manager.php index bca80bc5b03..c93795bea5b 100644 --- a/lib/private/UserStatus/Manager.php +++ b/lib/private/UserStatus/Manager.php @@ -121,4 +121,12 @@ class Manager implements IManager { } $this->provider->revertUserStatus($userId, $messageId, $status); } + + public function revertMultipleUserStatus(array $userIds, string $messageId, string $status): void { + $this->setupProvider(); + if (!$this->provider || !($this->provider instanceof ISettableProvider)) { + return; + } + $this->provider->revertMultipleUserStatus($userIds, $messageId, $status); + } } |