Skip to content

Commit 026d630

Browse files
toger5Half-Shot
authored andcommitted
Small improvements
Signed-off-by: Timo K <[email protected]>
1 parent 4cc4c01 commit 026d630

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/matrixrtc/MembershipManager.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1062,12 +1062,12 @@ export class StickyEventMembershipManager extends MembershipManager {
10621062
);
10631063
};
10641064

1065-
private static nameMap = new Map([
1066-
["sendStateEvent", "_unstable_sendStickyEvent"],
1067-
["sendDelayedStateEvent", "_unstable_sendStickyDelayedEvent"],
1068-
]);
10691065
protected actionUpdateFromErrors(e: unknown, t: MembershipActionType, m: string): ActionUpdate | undefined {
1070-
return super.actionUpdateFromErrors(e, t, StickyEventMembershipManager.nameMap.get(m) ?? "unknown");
1066+
const mappedMethod = new Map([
1067+
["sendStateEvent", "_unstable_sendStickyEvent"],
1068+
["_unstable_sendDelayedStateEvent", "_unstable_sendStickyDelayedEvent"],
1069+
]).get(m);
1070+
return super.actionUpdateFromErrors(e, t, mappedMethod ?? "unknown method");
10711071
}
10721072

10731073
protected makeMyMembership(expires: number): SessionMembershipData | RtcMembershipData {

0 commit comments

Comments
 (0)