Skip to content

Commit

Permalink
Bump matrix-js-sdk version to latest (#2201)
Browse files Browse the repository at this point in the history
* upgrade js-sdk version

* fix: build and typecheck errors

---------

Co-authored-by: dominic <[email protected]>
  • Loading branch information
ratik21 and domw30 authored Aug 26, 2024
1 parent bd64550 commit b52032f
Show file tree
Hide file tree
Showing 3 changed files with 106 additions and 87 deletions.
179 changes: 99 additions & 80 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"lodash.kebabcase": "^4.1.1",
"lodash.uniqby": "^4.7.0",
"matrix-encrypt-attachment": "^1.0.3",
"matrix-js-sdk": "^29.1.0",
"matrix-js-sdk": "^34.3.1",
"millify": "^6.1.0",
"moment": "^2.29.4",
"normalizr": "^3.6.2",
Expand Down
12 changes: 6 additions & 6 deletions src/lib/chat/matrix-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ export class MatrixClient implements IChatClient {
}

async userJoinedInviterOnZero(channelId: string, inviterId: string, inviteeId: string) {
this.matrix.sendEvent(channelId, CustomEventType.USER_JOINED_INVITER_ON_ZERO, {
this.matrix.sendEvent(channelId, CustomEventType.USER_JOINED_INVITER_ON_ZERO as any, {
inviterId,
inviteeId,
});
Expand All @@ -592,7 +592,7 @@ export class MatrixClient implements IChatClient {
body: message,
msgtype: MsgType.Text,
optimisticId: optimisticId,
};
} as any;

if (parentMessage) {
const fallback = constructFallbackForParentMessage(parentMessage);
Expand Down Expand Up @@ -625,7 +625,7 @@ export class MatrixClient implements IChatClient {
optimisticId: optimisticId,
};

const postResult = await this.matrix.sendEvent(channelId, CustomEventType.ROOM_POST, content);
const postResult = await this.matrix.sendEvent(channelId, CustomEventType.ROOM_POST as any, content);

return {
id: postResult.event_id,
Expand Down Expand Up @@ -669,7 +669,7 @@ export class MatrixClient implements IChatClient {
height,
},
optimisticId,
};
} as any;

const messageResult = await this.matrix.sendMessage(roomId, content);
this.recordMessageSent(roomId);
Expand Down Expand Up @@ -705,7 +705,7 @@ export class MatrixClient implements IChatClient {
rootMessageId,
},
optimisticId,
};
} as any;

const messageResult = await this.matrix.sendMessage(roomId, content);
this.recordMessageSent(roomId);
Expand Down Expand Up @@ -745,7 +745,7 @@ export class MatrixClient implements IChatClient {
rel_type: MatrixConstants.REPLACE,
event_id: messageId,
},
};
} as any;

const editResult = await this.matrix.sendMessage(roomId, content);
const newMessage = await this.matrix.fetchRoomEvent(roomId, editResult.event_id);
Expand Down

0 comments on commit b52032f

Please sign in to comment.