mirror of
https://github.com/nextcloud/spreed.git
synced 2025-07-21 10:37:10 +00:00
feat(userstatus): use busy status for calls
Signed-off-by: Anna Larch <anna@nextcloud.com>
This commit is contained in:
@ -62,7 +62,7 @@ class Listener implements IEventListener {
|
||||
|
||||
protected function setUserStatus(BeforeParticipantModifiedEvent $event): void {
|
||||
|
||||
$status = IUserStatus::AWAY;
|
||||
$status = IUserStatus::BUSY;
|
||||
|
||||
$userId = $event->getParticipant()->getAttendee()->getActorId();
|
||||
|
||||
@ -90,13 +90,13 @@ class Listener implements IEventListener {
|
||||
}
|
||||
|
||||
protected function revertUserStatusOnLeaveCall(BeforeParticipantModifiedEvent $event): void {
|
||||
$this->statusManager->revertUserStatus($event->getParticipant()->getAttendee()->getActorId(), 'call', IUserStatus::AWAY);
|
||||
$this->statusManager->revertUserStatus($event->getParticipant()->getAttendee()->getActorId(), 'call', IUserStatus::BUSY);
|
||||
}
|
||||
|
||||
protected function revertUserStatusOnEndCallForEveryone(CallEndedForEveryoneEvent $event): void {
|
||||
$userIds = $event->getUserIds();
|
||||
if (!empty($userIds)) {
|
||||
$this->statusManager->revertMultipleUserStatus($userIds, 'call', IUserStatus::AWAY);
|
||||
$this->statusManager->revertMultipleUserStatus($userIds, 'call', IUserStatus::BUSY);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -87,3 +87,6 @@ Feature: chat/one-to-one
|
||||
Then user "participant2" set status to "away" with 200 (v1)
|
||||
Then user "participant1" gets room "one-to-one room" with 200 (v4)
|
||||
| status | away |
|
||||
Then user "participant2" set status to "busy" with 200 (v1)
|
||||
Then user "participant1" gets room "one-to-one room" with 200 (v4)
|
||||
| status | busy |
|
||||
|
Reference in New Issue
Block a user