@unwanted/matrix-sdk-mini 34.12.0-7 → 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/git-revision.txt +1 -1
- package/lib/autodiscovery.js +3 -3
- package/lib/autodiscovery.js.map +1 -1
- package/lib/client.d.ts.map +1 -1
- package/lib/client.js +21 -21
- package/lib/client.js.map +1 -1
- package/lib/content-repo.js +2 -2
- package/lib/content-repo.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/http-api/prefix.d.ts +6 -7
- package/lib/http-api/prefix.d.ts.map +1 -1
- package/lib/http-api/prefix.js +6 -7
- package/lib/http-api/prefix.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 +95 -44
- package/lib/sync.js.map +1 -1
- package/package.json +7 -7
- package/src/autodiscovery.ts +3 -3
- package/src/client.ts +20 -21
- package/src/content-repo.ts +2 -2
- package/src/embedded.ts +35 -2
- package/src/http-api/prefix.ts +6 -8
- 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 +113 -47
package/lib/models/room.js
CHANGED
@@ -250,11 +250,13 @@ export class Room extends ReadReceipt {
|
|
250
250
|
timelineSet.addLiveEvent(thread.rootEvent, {
|
251
251
|
duplicateStrategy: DuplicateStrategy.Replace,
|
252
252
|
fromCache: false,
|
253
|
-
roomState: this.currentState
|
253
|
+
roomState: this.currentState,
|
254
|
+
addToState: false
|
254
255
|
});
|
255
256
|
} else {
|
256
257
|
timelineSet.addEventToTimeline(thread.rootEvent, timelineSet.getLiveTimeline(), {
|
257
|
-
toStartOfTimeline
|
258
|
+
toStartOfTimeline,
|
259
|
+
addToState: false
|
258
260
|
});
|
259
261
|
}
|
260
262
|
}
|
@@ -1437,8 +1439,8 @@ export class Room extends ReadReceipt {
|
|
1437
1439
|
* @remarks
|
1438
1440
|
* Fires {@link RoomEvent.Timeline}
|
1439
1441
|
*/
|
1440
|
-
addEventsToTimeline(events, toStartOfTimeline, timeline, paginationToken) {
|
1441
|
-
timeline.getTimelineSet().addEventsToTimeline(events, toStartOfTimeline, timeline, paginationToken);
|
1442
|
+
addEventsToTimeline(events, toStartOfTimeline, addToState, timeline, paginationToken) {
|
1443
|
+
timeline.getTimelineSet().addEventsToTimeline(events, toStartOfTimeline, addToState, timeline, paginationToken);
|
1442
1444
|
}
|
1443
1445
|
|
1444
1446
|
/**
|
@@ -1612,7 +1614,9 @@ export class Room extends ReadReceipt {
|
|
1612
1614
|
// see https://github.com/vector-im/vector-web/issues/2109
|
1613
1615
|
|
1614
1616
|
unfilteredLiveTimeline.getEvents().forEach(function (event) {
|
1615
|
-
timelineSet.addLiveEvent(event
|
1617
|
+
timelineSet.addLiveEvent(event, {
|
1618
|
+
addToState: false
|
1619
|
+
}); // Filtered timeline sets should not track state
|
1616
1620
|
});
|
1617
1621
|
|
1618
1622
|
// find the earliest unfiltered timeline
|
@@ -1687,7 +1691,8 @@ export class Room extends ReadReceipt {
|
|
1687
1691
|
});
|
1688
1692
|
if (filterType !== ThreadFilterType.My || currentUserParticipated) {
|
1689
1693
|
timelineSet.getLiveTimeline().addEvent(thread.rootEvent, {
|
1690
|
-
toStartOfTimeline: false
|
1694
|
+
toStartOfTimeline: false,
|
1695
|
+
addToState: false
|
1691
1696
|
});
|
1692
1697
|
}
|
1693
1698
|
});
|
@@ -1746,6 +1751,7 @@ export class Room extends ReadReceipt {
|
|
1746
1751
|
var _opts = {
|
1747
1752
|
duplicateStrategy: DuplicateStrategy.Ignore,
|
1748
1753
|
fromCache: false,
|
1754
|
+
addToState: false,
|
1749
1755
|
roomState
|
1750
1756
|
};
|
1751
1757
|
(_this11$threadsTimeli = _this11.threadsTimelineSets[0]) === null || _this11$threadsTimeli === void 0 || _this11$threadsTimeli.addLiveEvent(rootEvent, _opts);
|
@@ -1847,7 +1853,8 @@ export class Room extends ReadReceipt {
|
|
1847
1853
|
timelineSet.addLiveEvent(rootEvent, {
|
1848
1854
|
duplicateStrategy: DuplicateStrategy.Replace,
|
1849
1855
|
fromCache: false,
|
1850
|
-
roomState
|
1856
|
+
roomState,
|
1857
|
+
addToState: false
|
1851
1858
|
});
|
1852
1859
|
}
|
1853
1860
|
})();
|
@@ -2104,7 +2111,8 @@ export class Room extends ReadReceipt {
|
|
2104
2111
|
var {
|
2105
2112
|
duplicateStrategy,
|
2106
2113
|
timelineWasEmpty,
|
2107
|
-
fromCache
|
2114
|
+
fromCache,
|
2115
|
+
addToState
|
2108
2116
|
} = addLiveEventOptions;
|
2109
2117
|
|
2110
2118
|
// add to our timeline sets
|
@@ -2112,7 +2120,8 @@ export class Room extends ReadReceipt {
|
|
2112
2120
|
timelineSet.addLiveEvent(event, {
|
2113
2121
|
duplicateStrategy,
|
2114
2122
|
fromCache,
|
2115
|
-
timelineWasEmpty
|
2123
|
+
timelineWasEmpty,
|
2124
|
+
addToState
|
2116
2125
|
});
|
2117
2126
|
}
|
2118
2127
|
|
@@ -2192,12 +2201,14 @@ export class Room extends ReadReceipt {
|
|
2192
2201
|
if (timelineSet.getFilter()) {
|
2193
2202
|
if (timelineSet.getFilter().filterRoomTimeline([event]).length) {
|
2194
2203
|
timelineSet.addEventToTimeline(event, timelineSet.getLiveTimeline(), {
|
2195
|
-
toStartOfTimeline: false
|
2204
|
+
toStartOfTimeline: false,
|
2205
|
+
addToState: false // We don't support localEcho of state events yet
|
2196
2206
|
});
|
2197
2207
|
}
|
2198
2208
|
} else {
|
2199
2209
|
timelineSet.addEventToTimeline(event, timelineSet.getLiveTimeline(), {
|
2200
|
-
toStartOfTimeline: false
|
2210
|
+
toStartOfTimeline: false,
|
2211
|
+
addToState: false // We don't support localEcho of state events yet
|
2201
2212
|
});
|
2202
2213
|
}
|
2203
2214
|
}
|
@@ -2430,8 +2441,9 @@ export class Room extends ReadReceipt {
|
|
2430
2441
|
var {
|
2431
2442
|
duplicateStrategy,
|
2432
2443
|
fromCache,
|
2433
|
-
timelineWasEmpty = false
|
2434
|
-
|
2444
|
+
timelineWasEmpty = false,
|
2445
|
+
addToState
|
2446
|
+
} = addLiveEventOptions;
|
2435
2447
|
if (duplicateStrategy && ["replace", "ignore"].indexOf(duplicateStrategy) === -1) {
|
2436
2448
|
throw new Error("duplicateStrategy MUST be either 'replace' or 'ignore'");
|
2437
2449
|
}
|
@@ -2443,7 +2455,8 @@ export class Room extends ReadReceipt {
|
|
2443
2455
|
var options = {
|
2444
2456
|
duplicateStrategy,
|
2445
2457
|
fromCache,
|
2446
|
-
timelineWasEmpty
|
2458
|
+
timelineWasEmpty,
|
2459
|
+
addToState
|
2447
2460
|
};
|
2448
2461
|
|
2449
2462
|
// List of extra events to check for being parents of any relations encountered
|