Remove async for ScalarMessaging.ts

This commit is contained in:
Florian Duros 2024-11-19 10:08:41 +01:00
parent 60529538c3
commit a5a9e5fe39
No known key found for this signature in database
GPG key ID: A5BBB4041B493F15

View file

@ -841,7 +841,7 @@ async function readEvents(
}
}
const onMessage = async function (event: MessageEvent<any>): Promise<void> {
const onMessage = function (event: MessageEvent<any>): void {
if (!event.origin) {
// @ts-ignore - stupid chrome
event.origin = event.originalEvent.origin;
@ -928,7 +928,7 @@ const onMessage = async function (event: MessageEvent<any>): Promise<void> {
getMembershipCount(event, roomId);
return;
} else if (event.data.action === Action.GetRoomEncryptionState) {
await getRoomEncState(event, roomId);
getRoomEncState(event, roomId);
return;
} else if (event.data.action === Action.CanSendEvent) {
canSendEvent(event, roomId);