[#651] Fix the handling of subscribed calendar ws message to be the same as registered ws message
This commit is contained in:
committed by
Benoit TELLIER
parent
29e9619f02
commit
c6e5c07f66
@@ -23,7 +23,17 @@ export function parseMessage(message: unknown) {
|
||||
case WS_INBOUND_EVENTS.CALENDAR_CLIENT_REGISTERED:
|
||||
break;
|
||||
case WS_INBOUND_EVENTS.CALENDAR_LIST:
|
||||
Object.keys(value).forEach((key) => {
|
||||
if (key === "subscribed") {
|
||||
if (Array.isArray(value[key])) {
|
||||
value[key].forEach((cal: string) => calendarsToRefresh.add(cal));
|
||||
}
|
||||
} else if (key === "deleted") {
|
||||
shouldRefreshCalendarList = true;
|
||||
} else {
|
||||
shouldRefreshCalendarList = true;
|
||||
}
|
||||
});
|
||||
break;
|
||||
default: {
|
||||
calendarsToRefresh.add(key);
|
||||
|
||||
Reference in New Issue
Block a user