Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Add logging in case of failure
Browse files Browse the repository at this point in the history
  • Loading branch information
florianduros committed Mar 28, 2024
1 parent 76f2a23 commit caeccb8
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/stores/ReleaseAnnouncementStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
*/

import { TypedEventEmitter } from "matrix-js-sdk/src/matrix";
import { logger } from "matrix-js-sdk/src/logger";

import SettingsStore from "../settings/SettingsStore";
import { SettingLevel } from "../settings/SettingLevel";
Expand Down Expand Up @@ -128,7 +129,16 @@ export class ReleaseAnnouncementStore extends TypedEventEmitter<ReleaseAnnouncem

const canSetValue = SettingsStore.canSetValue("releaseAnnouncement", null, SettingLevel.ACCOUNT);
if (canSetValue) {
await SettingsStore.setValue("releaseAnnouncement", null, SettingLevel.ACCOUNT, viewedReleaseAnnouncements);
try {
await SettingsStore.setValue(
"releaseAnnouncement",
null,
SettingLevel.ACCOUNT,
viewedReleaseAnnouncements,
);
} catch (e) {
logger.log("Failed to set release announcement settings", e);
}
}
}

Expand Down

0 comments on commit caeccb8

Please sign in to comment.