feat(userstatus): use busy status for calls

Signed-off-by: Anna Larch <anna@nextcloud.com>
This commit is contained in:
Anna Larch
2025-07-07 19:03:13 +02:00
parent f475071d2c
commit fb9d4f7bbf
2 changed files with 6 additions and 3 deletions

View File

@ -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);
}
}
}

View File

@ -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 |