1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-25 05:23:13 +03:00

correct usage of methods that now became async

Signed-off-by: Timo K <toger5@hotmail.de>
This commit is contained in:
Timo K
2025-10-06 17:49:46 +02:00
parent 4bbb240142
commit aa1cbe90ef
4 changed files with 50 additions and 50 deletions

View File

@@ -731,7 +731,7 @@ export class MatrixRTCSession extends TypedEventEmitter<
}
if (soonestExpiry != undefined) {
this.expiryTimeout = setTimeout(this.onRTCSessionMemberUpdate, soonestExpiry);
this.expiryTimeout = setTimeout(() => void this.onRTCSessionMemberUpdate(), soonestExpiry);
}
}
@@ -803,8 +803,8 @@ export class MatrixRTCSession extends TypedEventEmitter<
/**
* Call this when something changed that may impacts the current MatrixRTC members in this session.
*/
public onRTCSessionMemberUpdate = (): void => {
void this.recalculateSessionMembers();
public onRTCSessionMemberUpdate = (): Promise<void> => {
return this.recalculateSessionMembers();
};
/**
@@ -838,7 +838,7 @@ export class MatrixRTCSession extends TypedEventEmitter<
this.emit(MatrixRTCSessionEvent.MembershipsChanged, oldMemberships, this.memberships);
});
void this.membershipManager?.onRTCSessionMemberUpdate(this.memberships);
await this.membershipManager?.onRTCSessionMemberUpdate(this.memberships);
// The `ownMembership` will be set when calling `onRTCSessionMemberUpdate`.
const ownMembership = this.membershipManager?.ownMembership;
if (this.pendingNotificationToSend && ownMembership && oldMemberships.length === 0) {