1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2026-01-03 21:42:32 +03:00

Do not create account data event for guests (#9407)

* Do not create account data event for guests

* fix test
This commit is contained in:
Germain
2022-10-13 13:15:34 +01:00
committed by GitHub
parent 7a1c47a23e
commit 714ba6db94
2 changed files with 24 additions and 12 deletions

View File

@@ -31,6 +31,9 @@ export function getLocalNotificationAccountDataEventType(deviceId: string): stri
}
export async function createLocalNotificationSettingsIfNeeded(cli: MatrixClient): Promise<void> {
if (cli.isGuest()) {
return;
}
const eventType = getLocalNotificationAccountDataEventType(cli.deviceId);
const event = cli.getAccountData(eventType);
// New sessions will create an account data event to signify they support