diff --git a/lib/sync.js b/lib/sync.js index 08f041c20..c51fb9460 100644 --- a/lib/sync.js +++ b/lib/sync.js @@ -470,6 +470,10 @@ SyncApi.prototype._processRoomEvents = function(room, stateEventList, this._resolveInvites(room); + // recalculate the room name at this point as adding events to the timeline + // may make notifications appear which should have the right name. + room.recalculate(this.client.credentials.userId); + // execute the timeline events, this will begin to diverge the current state // if the timeline has any state events in it. room.addEventsToTimeline(timelineEventList);