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
Update for new unread count format
This commit is contained in:
@@ -384,7 +384,10 @@ SyncApi.prototype._sync = function(syncOptions, attempt) {
|
||||
// timeline: { events: [], prev_batch: $token, limited: true },
|
||||
// ephemeral: { events: [] },
|
||||
// account_data: { events: [] },
|
||||
// unread_notification_count: 0
|
||||
// unread_notifications: {
|
||||
// highlight_count: 0,
|
||||
// notification_count: 0,
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
// leave: {
|
||||
@@ -466,7 +469,7 @@ SyncApi.prototype._sync = function(syncOptions, attempt) {
|
||||
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;
|
||||
room.unread_notifications = joinObj.unread_notifications || {};
|
||||
|
||||
joinObj.timeline = joinObj.timeline || {};
|
||||
|
||||
|
Reference in New Issue
Block a user