[#651] Fix the handling of subscribed calendar ws message to be the same as registered ws message

This commit is contained in:
Camille Moussu
2026-03-17 10:59:07 +01:00
committed by Benoit TELLIER
parent 29e9619f02
commit c6e5c07f66
+11 -1
View File
@@ -23,7 +23,17 @@ export function parseMessage(message: unknown) {
case WS_INBOUND_EVENTS.CALENDAR_CLIENT_REGISTERED:
break;
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;
default: {
calendarsToRefresh.add(key);