[#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:
|
case WS_INBOUND_EVENTS.CALENDAR_CLIENT_REGISTERED:
|
||||||
break;
|
break;
|
||||||
case WS_INBOUND_EVENTS.CALENDAR_LIST:
|
case WS_INBOUND_EVENTS.CALENDAR_LIST:
|
||||||
shouldRefreshCalendarList = true;
|
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;
|
break;
|
||||||
default: {
|
default: {
|
||||||
calendarsToRefresh.add(key);
|
calendarsToRefresh.add(key);
|
||||||
|
|||||||
Reference in New Issue
Block a user