aboutsummaryrefslogtreecommitdiff
path: root/matrix/sync.go
diff options
context:
space:
mode:
authorTulir Asokan <tulir@maunium.net>2018-04-24 23:52:31 +0300
committerTulir Asokan <tulir@maunium.net>2018-04-24 23:52:31 +0300
commit3de07ad550776a57e96399660c0ccd9c58dafcf3 (patch)
tree1fc7625340d12c7798708b87152331203aab8e9b /matrix/sync.go
parent7026ed99a3ef4071a35e74d2d5f9026f6848be92 (diff)
Add tests for syncer and fix some bugs
Diffstat (limited to 'matrix/sync.go')
-rw-r--r--matrix/sync.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/matrix/sync.go b/matrix/sync.go
index 8ad7ad5..8ff3d39 100644
--- a/matrix/sync.go
+++ b/matrix/sync.go
@@ -74,7 +74,8 @@ func (s *GomuksSyncer) ProcessResponse(res *gomatrix.RespSync, since string) (er
for roomID, roomData := range res.Rooms.Leave {
room := s.Session.GetRoom(roomID)
- s.processSyncEvents(room, roomData.Timeline.Events, true, true)
+ s.processSyncEvents(room, roomData.State.Events, true, true)
+ s.processSyncEvents(room, roomData.Timeline.Events, false, false)
if len(room.PrevBatch) == 0 {
room.PrevBatch = roomData.Timeline.PrevBatch