@unwanted/matrix-sdk-mini 34.12.0-8 → 34.12.0-9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/client.js +11 -11
- package/lib/client.js.map +1 -1
- package/lib/embedded.d.ts.map +1 -1
- package/lib/embedded.js +35 -2
- package/lib/embedded.js.map +1 -1
- package/lib/models/event-timeline-set.d.ts +6 -10
- package/lib/models/event-timeline-set.d.ts.map +1 -1
- package/lib/models/event-timeline-set.js +28 -36
- package/lib/models/event-timeline-set.js.map +1 -1
- package/lib/models/event-timeline.d.ts +7 -2
- package/lib/models/event-timeline.d.ts.map +1 -1
- package/lib/models/event-timeline.js +8 -9
- package/lib/models/event-timeline.js.map +1 -1
- package/lib/models/event.d.ts.map +1 -1
- package/lib/models/event.js +1 -1
- package/lib/models/event.js.map +1 -1
- package/lib/models/room-state.d.ts +2 -13
- package/lib/models/room-state.d.ts.map +1 -1
- package/lib/models/room-state.js +2 -30
- package/lib/models/room-state.js.map +1 -1
- package/lib/models/room.d.ts +2 -2
- package/lib/models/room.d.ts.map +1 -1
- package/lib/models/room.js +27 -14
- package/lib/models/room.js.map +1 -1
- package/lib/models/thread.d.ts.map +1 -1
- package/lib/models/thread.js +5 -3
- package/lib/models/thread.js.map +1 -1
- package/lib/sliding-sync-sdk.d.ts +1 -1
- package/lib/sliding-sync-sdk.d.ts.map +1 -1
- package/lib/sliding-sync-sdk.js +15 -13
- package/lib/sliding-sync-sdk.js.map +1 -1
- package/lib/sync-accumulator.d.ts +6 -4
- package/lib/sync-accumulator.d.ts.map +1 -1
- package/lib/sync-accumulator.js +23 -12
- package/lib/sync-accumulator.js.map +1 -1
- package/lib/sync.d.ts +10 -1
- package/lib/sync.d.ts.map +1 -1
- package/lib/sync.js +93 -42
- package/lib/sync.js.map +1 -1
- package/package.json +6 -6
- package/src/client.ts +11 -11
- package/src/embedded.ts +35 -2
- package/src/models/event-timeline-set.ts +17 -38
- package/src/models/event-timeline.ts +10 -5
- package/src/models/event.ts +3 -1
- package/src/models/room-state.ts +2 -29
- package/src/models/room.ts +18 -6
- package/src/models/thread.ts +4 -2
- package/src/sliding-sync-sdk.ts +8 -11
- package/src/sync-accumulator.ts +33 -16
- package/src/sync.ts +111 -45
package/lib/client.js
CHANGED
@@ -2309,7 +2309,7 @@ export class MatrixClient extends TypedEventEmitter {
|
|
2309
2309
|
}
|
2310
2310
|
var [timelineEvents, threadedEvents, unknownRelations] = room.partitionThreadedEvents(matrixEvents);
|
2311
2311
|
this.processAggregatedTimelineEvents(room, timelineEvents);
|
2312
|
-
room.addEventsToTimeline(timelineEvents, true, room.getLiveTimeline());
|
2312
|
+
room.addEventsToTimeline(timelineEvents, true, true, room.getLiveTimeline());
|
2313
2313
|
this.processThreadEvents(room, threadedEvents, true);
|
2314
2314
|
unknownRelations.forEach(event => room.relations.aggregateChildEvent(event));
|
2315
2315
|
room.oldState.paginationToken = (_res$end = res.end) !== null && _res$end !== void 0 ? _res$end : null;
|
@@ -2410,7 +2410,7 @@ export class MatrixClient extends TypedEventEmitter {
|
|
2410
2410
|
timeline.getState(EventTimeline.FORWARDS).paginationToken = res.end;
|
2411
2411
|
}
|
2412
2412
|
var [timelineEvents, threadedEvents, unknownRelations] = timelineSet.room.partitionThreadedEvents(events);
|
2413
|
-
timelineSet.addEventsToTimeline(timelineEvents, true, timeline, res.start);
|
2413
|
+
timelineSet.addEventsToTimeline(timelineEvents, true, false, timeline, res.start);
|
2414
2414
|
// The target event is not in a thread but process the contextual events, so we can show any threads around it.
|
2415
2415
|
_this25.processThreadEvents(timelineSet.room, threadedEvents, true);
|
2416
2416
|
_this25.processAggregatedTimelineEvents(timelineSet.room, timelineEvents);
|
@@ -2491,10 +2491,10 @@ export class MatrixClient extends TypedEventEmitter {
|
|
2491
2491
|
timeline = timelineSet.addTimeline();
|
2492
2492
|
timeline.initialiseState(res.state.map(mapper));
|
2493
2493
|
}
|
2494
|
-
timelineSet.addEventsToTimeline(events, true, timeline, resNewer.next_batch);
|
2494
|
+
timelineSet.addEventsToTimeline(events, true, false, timeline, resNewer.next_batch);
|
2495
2495
|
if (!resOlder.next_batch) {
|
2496
2496
|
var originalEvent = yield _this26.fetchRoomEvent(timelineSet.room.roomId, thread.id);
|
2497
|
-
timelineSet.addEventsToTimeline([mapper(originalEvent)], true, timeline, null);
|
2497
|
+
timelineSet.addEventsToTimeline([mapper(originalEvent)], true, false, timeline, null);
|
2498
2498
|
}
|
2499
2499
|
timeline.setPaginationToken((_resOlder$next_batch = resOlder.next_batch) !== null && _resOlder$next_batch !== void 0 ? _resOlder$next_batch : null, Direction.Backward);
|
2500
2500
|
timeline.setPaginationToken((_resNewer$next_batch = resNewer.next_batch) !== null && _resNewer$next_batch !== void 0 ? _resNewer$next_batch : null, Direction.Forward);
|
@@ -2542,10 +2542,10 @@ export class MatrixClient extends TypedEventEmitter {
|
|
2542
2542
|
// summaries.
|
2543
2543
|
var _timeline = timelineSet.getLiveTimeline();
|
2544
2544
|
_timeline.getState(EventTimeline.BACKWARDS).setUnknownStateEvents(res.state.map(mapper));
|
2545
|
-
timelineSet.addEventsToTimeline(_events, true, _timeline, null);
|
2545
|
+
timelineSet.addEventsToTimeline(_events, true, false, _timeline, null);
|
2546
2546
|
if (!_resOlder.next_batch) {
|
2547
2547
|
var _originalEvent = yield _this26.fetchRoomEvent(timelineSet.room.roomId, _thread.id);
|
2548
|
-
timelineSet.addEventsToTimeline([mapper(_originalEvent)], true, _timeline, null);
|
2548
|
+
timelineSet.addEventsToTimeline([mapper(_originalEvent)], true, false, _timeline, null);
|
2549
2549
|
}
|
2550
2550
|
_timeline.setPaginationToken((_resOlder$next_batch2 = _resOlder.next_batch) !== null && _resOlder$next_batch2 !== void 0 ? _resOlder$next_batch2 : null, Direction.Backward);
|
2551
2551
|
_timeline.setPaginationToken(null, Direction.Forward);
|
@@ -2773,7 +2773,7 @@ export class MatrixClient extends TypedEventEmitter {
|
|
2773
2773
|
// No need to partition events for threads here, everything lives
|
2774
2774
|
// in the notification timeline set
|
2775
2775
|
var timelineSet = eventTimeline.getTimelineSet();
|
2776
|
-
timelineSet.addEventsToTimeline(matrixEvents, backwards, eventTimeline, token);
|
2776
|
+
timelineSet.addEventsToTimeline(matrixEvents, backwards, false, eventTimeline, token);
|
2777
2777
|
_this28.processAggregatedTimelineEvents(timelineSet.room, matrixEvents);
|
2778
2778
|
|
2779
2779
|
// if we've hit the end of the timeline, we need to stop trying to
|
@@ -2807,7 +2807,7 @@ export class MatrixClient extends TypedEventEmitter {
|
|
2807
2807
|
var token = res.end;
|
2808
2808
|
var matrixEvents = res.chunk.filter(noUnsafeEventProps).map(this.getEventMapper());
|
2809
2809
|
var timelineSet = eventTimeline.getTimelineSet();
|
2810
|
-
timelineSet.addEventsToTimeline(matrixEvents, backwards, eventTimeline, token);
|
2810
|
+
timelineSet.addEventsToTimeline(matrixEvents, backwards, false, eventTimeline, token);
|
2811
2811
|
this.processAggregatedTimelineEvents(room, matrixEvents);
|
2812
2812
|
this.processThreadRoots(room, matrixEvents, backwards);
|
2813
2813
|
|
@@ -2849,11 +2849,11 @@ export class MatrixClient extends TypedEventEmitter {
|
|
2849
2849
|
}
|
2850
2850
|
var newToken = res.next_batch;
|
2851
2851
|
var timelineSet = eventTimeline.getTimelineSet();
|
2852
|
-
timelineSet.addEventsToTimeline(matrixEvents, backwards, eventTimeline, newToken !== null && newToken !== void 0 ? newToken : null);
|
2852
|
+
timelineSet.addEventsToTimeline(matrixEvents, backwards, false, eventTimeline, newToken !== null && newToken !== void 0 ? newToken : null);
|
2853
2853
|
if (!newToken && backwards) {
|
2854
2854
|
var _thread$rootEvent, _eventTimeline$getRoo3;
|
2855
2855
|
var originalEvent = (_thread$rootEvent = thread.rootEvent) !== null && _thread$rootEvent !== void 0 ? _thread$rootEvent : mapper(yield _this28.fetchRoomEvent((_eventTimeline$getRoo3 = eventTimeline.getRoomId()) !== null && _eventTimeline$getRoo3 !== void 0 ? _eventTimeline$getRoo3 : "", thread.id));
|
2856
|
-
timelineSet.addEventsToTimeline([originalEvent], true, eventTimeline, null);
|
2856
|
+
timelineSet.addEventsToTimeline([originalEvent], true, false, eventTimeline, null);
|
2857
2857
|
}
|
2858
2858
|
_this28.processAggregatedTimelineEvents(timelineSet.room, matrixEvents);
|
2859
2859
|
|
@@ -2886,7 +2886,7 @@ export class MatrixClient extends TypedEventEmitter {
|
|
2886
2886
|
var matrixEvents = res.chunk.filter(noUnsafeEventProps).map(this.getEventMapper());
|
2887
2887
|
var timelineSet = eventTimeline.getTimelineSet();
|
2888
2888
|
var [timelineEvents,, unknownRelations] = room.partitionThreadedEvents(matrixEvents);
|
2889
|
-
timelineSet.addEventsToTimeline(timelineEvents, backwards, eventTimeline, token);
|
2889
|
+
timelineSet.addEventsToTimeline(timelineEvents, backwards, false, eventTimeline, token);
|
2890
2890
|
this.processAggregatedTimelineEvents(room, timelineEvents);
|
2891
2891
|
this.processThreadRoots(room, timelineEvents.filter(it => it.getServerAggregatedRelation(THREAD_RELATION_TYPE.name)), false);
|
2892
2892
|
unknownRelations.forEach(event => room.relations.aggregateChildEvent(event));
|