You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-09-01 21:21:58 +03:00
Propagate unread notif count from sync to the room object
This commit is contained in:
@@ -246,7 +246,8 @@ SyncApi.prototype._sync = function(syncOptions, attempt) {
|
||||
// state: { events: [] },
|
||||
// timeline: { events: [], prev_batch: $token, limited: true },
|
||||
// ephemeral: { events: [] },
|
||||
// account_data: { events: [] }
|
||||
// account_data: { events: [] },
|
||||
// unread_notification_count: 0
|
||||
// }
|
||||
// },
|
||||
// leave: {
|
||||
@@ -326,6 +327,9 @@ SyncApi.prototype._sync = function(syncOptions, attempt) {
|
||||
var ephemeralEvents = self._mapSyncEventsFormat(joinObj.ephemeral);
|
||||
var accountDataEvents = self._mapSyncEventsFormat(joinObj.account_data);
|
||||
|
||||
// we do this first so it's correct when any of the events fire
|
||||
room.unread_notification_count = joinObj.unread_notification_count;
|
||||
|
||||
joinObj.timeline = joinObj.timeline || {};
|
||||
|
||||
if (joinObj.timeline.limited) {
|
||||
|
Reference in New Issue
Block a user