Skip to content

Commit 06438a4

Browse files
committed
Another sdk patch
1 parent 17e3a7c commit 06438a4

File tree

5 files changed

+11
-13
lines changed

5 files changed

+11
-13
lines changed

packages/host/app/services/matrix-service.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ const MAX_CARD_SIZE_KB = 60;
119119
const STATE_EVENTS_OF_INTEREST = ['m.room.create', 'm.room.name'];
120120
const SLIDING_SYNC_AI_ROOM_LIST_NAME = 'ai-room';
121121
const SLIDING_SYNC_AUTH_ROOM_LIST_NAME = 'auth-room';
122-
const SLIDING_SYNC_LIST_RANGE_SIZE = 10;
122+
const SLIDING_SYNC_LIST_RANGE_END = 9;
123123
const SLIDING_SYNC_LIST_TIMELINE_LIMIT = 1;
124124

125125
const realmEventsLogger = logger('realm:events');
@@ -513,15 +513,15 @@ export default class MatrixService extends Service {
513513
private initSlidingSync() {
514514
let lists: Map<string, MSC3575List> = new Map();
515515
lists.set(SLIDING_SYNC_AI_ROOM_LIST_NAME, {
516-
ranges: [[0, SLIDING_SYNC_LIST_RANGE_SIZE]],
516+
ranges: [[0, SLIDING_SYNC_LIST_RANGE_END]],
517517
filters: {
518518
is_dm: false,
519519
},
520520
timeline_limit: SLIDING_SYNC_LIST_TIMELINE_LIMIT,
521521
required_state: [['*', '*']],
522522
});
523523
lists.set(SLIDING_SYNC_AUTH_ROOM_LIST_NAME, {
524-
ranges: [[0, SLIDING_SYNC_LIST_RANGE_SIZE]],
524+
ranges: [[0, SLIDING_SYNC_LIST_RANGE_END]],
525525
filters: {
526526
is_dm: true,
527527
},

packages/host/ember-cli-build.js

-2
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,6 @@ module.exports = function (defaults) {
8787
},
8888
alias: {
8989
'matrix-js-sdk$': 'matrix-js-sdk/src/browser-index.ts', // Consume matrix-js-sdk via Typescript ESM so that code splitting works to exlcude massive matrix-sdk-crypto-wasm from the main bundle
90-
'matrix-js-sdk/src/sliding-sync':
91-
'matrix-js-sdk/src/sliding-sync.ts',
9290
},
9391
},
9492
node: {

packages/runtime-common/realm-auth-client.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@ export class RealmAuthClient {
104104
}
105105

106106
let directRooms = await this.matrixClient.getAccountData('m.direct');
107-
if (!directRooms?.includes(room)) {
108-
let userId = this.matrixClient.getUserId() as string;
107+
let userId = this.matrixClient.getUserId() as string;
108+
if (!directRooms?.[userId]?.includes(room)) {
109109
await this.matrixClient.setAccountData('m.direct', {
110110
[userId]: [...(directRooms?.[userId] ?? []), room],
111111
});

patches/matrix-js-sdk@31.0.0.patch

10.6 KB
Binary file not shown.

pnpm-lock.yaml

+6-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)