зеркало из
1
0
Форкнуть 0

Delete join and closing breakout room notification when unassigned from breakout room (#5108)

* Delete joined and closing breakout room notifications when user is unassigned from breakout room or re-assigned to a closed breakout room

* Change files

* clear timeout also
This commit is contained in:
mgamis-msft 2024-09-05 12:00:23 -07:00 коммит произвёл GitHub
Родитель dd65c44551
Коммит 9446da143e
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
3 изменённых файлов: 29 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,9 @@
{
"type": "patch",
"area": "fix",
"workstream": "Breakout rooms",
"comment": "Delete joined and closing breakout room notifications when user is unassigned from breakout room or re-assigned to a closed breakout room",
"packageName": "@azure/communication-react",
"email": "79475487+mgamis-msft@users.noreply.github.com",
"dependentChangeType": "patch"
}

Просмотреть файл

@ -0,0 +1,9 @@
{
"type": "patch",
"area": "fix",
"workstream": "Breakout rooms",
"comment": "Delete joined and closing breakout room notifications when user is unassigned from breakout room or re-assigned to a closed breakout room",
"packageName": "@azure/communication-react",
"email": "79475487+mgamis-msft@users.noreply.github.com",
"dependentChangeType": "patch"
}

Просмотреть файл

@ -72,6 +72,12 @@ export class BreakoutRoomsSubscriber {
}
if (!breakoutRoom) {
// This scenario covers the case where the user is unassigned from a breakout room.
if (currentAssignedBreakoutRoom?.call?.id) {
this._context.deleteLatestNotification(currentAssignedBreakoutRoom.call.id, 'breakoutRoomJoined');
this._context.deleteLatestNotification(currentAssignedBreakoutRoom.call.id, 'breakoutRoomClosingSoon');
clearTimeout(this._breakoutRoomClosingSoonTimeoutId);
}
this._context.setAssignedBreakoutRoom(this._callIdRef.callId, breakoutRoom);
return;
}
@ -103,6 +109,11 @@ export class BreakoutRoomsSubscriber {
this._context.deleteLatestNotification(this._callIdRef.callId, 'assignedBreakoutRoomOpened');
this._context.deleteLatestNotification(this._callIdRef.callId, 'assignedBreakoutRoomOpenedPromptJoin');
this._context.deleteLatestNotification(this._callIdRef.callId, 'assignedBreakoutRoomChanged');
} else if (breakoutRoom.state === 'closed' && currentAssignedBreakoutRoom?.call?.id) {
// This scenario covers the case where the breakout room is changed to a closed breakout room.
this._context.deleteLatestNotification(currentAssignedBreakoutRoom.call.id, 'breakoutRoomJoined');
this._context.deleteLatestNotification(currentAssignedBreakoutRoom.call.id, 'breakoutRoomClosingSoon');
clearTimeout(this._breakoutRoomClosingSoonTimeoutId);
}
this._context.setAssignedBreakoutRoom(this._callIdRef.callId, breakoutRoom);
};