You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-08-09 10:22:46 +03:00
Fix invite processing on Element-R (#3121)
Currently, whenever we receive an invite on element R, it crashes the sync loop. A quick fix to make it not do that.
This commit is contained in:
committed by
GitHub
parent
8f5db463e7
commit
44d2e47f96
@@ -1254,11 +1254,12 @@ export class SyncApi {
|
||||
|
||||
const inviter = room.currentState.getStateEvents(EventType.RoomMember, client.getUserId()!)?.getSender();
|
||||
|
||||
if (client.isCryptoEnabled()) {
|
||||
const parkedHistory = await client.crypto!.cryptoStore.takeParkedSharedHistory(room.roomId);
|
||||
const crypto = client.crypto;
|
||||
if (crypto) {
|
||||
const parkedHistory = await crypto.cryptoStore.takeParkedSharedHistory(room.roomId);
|
||||
for (const parked of parkedHistory) {
|
||||
if (parked.senderId === inviter) {
|
||||
await client.crypto!.olmDevice.addInboundGroupSession(
|
||||
await crypto.olmDevice.addInboundGroupSession(
|
||||
room.roomId,
|
||||
parked.senderKey,
|
||||
parked.forwardingCurve25519KeyChain,
|
||||
|
Reference in New Issue
Block a user