Skip to content

Commit ca12d5a

Browse files
Change event shape to match MSC3898 (#2964)
1 parent 8f7d6dd commit ca12d5a

File tree

5 files changed

+175
-195
lines changed

5 files changed

+175
-195
lines changed

src/@types/event.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ export enum EventType {
4242
RoomMessage = "m.room.message",
4343
RoomMessageEncrypted = "m.room.encrypted",
4444
Sticker = "m.sticker",
45+
4546
CallInvite = "m.call.invite",
4647
CallCandidates = "m.call.candidates",
4748
CallAnswer = "m.call.answer",
@@ -54,6 +55,10 @@ export enum EventType {
5455
CallReplaces = "m.call.replaces",
5556
CallAssertedIdentity = "m.call.asserted_identity",
5657
CallAssertedIdentityPrefix = "org.matrix.call.asserted_identity",
58+
CallTrackSubscription = "m.call.track_subscription",
59+
CallPing = "m.call.ping",
60+
CallPong = "m.call.pong",
61+
5762
KeyVerificationRequest = "m.key.verification.request",
5863
KeyVerificationStart = "m.key.verification.start",
5964
KeyVerificationCancel = "m.key.verification.cancel",

src/client.ts

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1774,10 +1774,12 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
17741774
public getFoci(): IFocusInfo[] {
17751775
if (!this.localSfuUserId || !this.localSfuDeviceId) return [];
17761776

1777-
return [{
1778-
user_id: this.localSfuUserId,
1779-
device_id: this.localSfuDeviceId,
1780-
}];
1777+
return [
1778+
{
1779+
user_id: this.localSfuUserId,
1780+
device_id: this.localSfuDeviceId,
1781+
},
1782+
];
17811783
}
17821784

17831785
/**
@@ -9332,13 +9334,13 @@ export function fixNotificationCountOnDecryption(cli: MatrixClient, event: Matri
93329334
const thread = room.getThread(event.threadRootId);
93339335
hasReadEvent = thread
93349336
? thread.hasUserReadEvent(cli.getUserId()!, event.getId()!)
9335-
// If the thread object does not exist in the room yet, we don't
9336-
// want to calculate notification for this event yet. We have not
9337-
// restored the read receipts yet and can't accurately calculate
9338-
// highlight notifications at this stage.
9339-
//
9340-
// This issue can likely go away when MSC3874 is implemented
9341-
: true;
9337+
: // If the thread object does not exist in the room yet, we don't
9338+
// want to calculate notification for this event yet. We have not
9339+
// restored the read receipts yet and can't accurately calculate
9340+
// highlight notifications at this stage.
9341+
//
9342+
// This issue can likely go away when MSC3874 is implemented
9343+
true;
93429344
} else {
93439345
hasReadEvent = room.hasUserReadEvent(cli.getUserId()!, event.getId()!);
93449346
}

0 commit comments

Comments
 (0)