diff options
author | Kegan Dougal <kegan@matrix.org> | 2014-11-03 17:52:41 +0000 |
---|---|---|
committer | Kegan Dougal <kegan@matrix.org> | 2014-11-03 17:52:41 +0000 |
commit | 2438b8b66b8dc08d0fe77447b0a3cdb39e9a8f95 (patch) | |
tree | af8a8cc6d57eb1c98c2e6cdface49abbd8f98f50 | |
parent | Backwards compat for old-style avatar_urls (diff) | |
download | synapse-2438b8b66b8dc08d0fe77447b0a3cdb39e9a8f95.tar.xz |
Fix off-by-one bug when displaying display names / avatar urls when paginating.
Diffstat (limited to '')
-rw-r--r-- | webclient/components/matrix/event-handler-service.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/webclient/components/matrix/event-handler-service.js b/webclient/components/matrix/event-handler-service.js index eff8674e04..1b9a99eaa4 100644 --- a/webclient/components/matrix/event-handler-service.js +++ b/webclient/components/matrix/event-handler-service.js @@ -201,6 +201,13 @@ function(matrixService, $rootScope, $q, $timeout, mPresence, notificationService } else if (!isLiveEvent) { // mutate the old room state + var oldEvent = angular.copy(event); + if (event.prev_content) { + // the m.room.member event we are handling is the NEW event. When + // we keep going back in time, we want the PREVIOUS value for displaying + // names/etc, hence the clobber here. + event.content = event.prev_content; + } room.old_room_state.storeStateEvent(angular.copy(event)); } |