diff --git a/responses.go b/responses.go index 7a3a4ce..cc46d16 100644 --- a/responses.go +++ b/responses.go @@ -159,6 +159,9 @@ type RespSync struct { Limited bool `json:"limited"` PrevBatch string `json:"prev_batch"` } `json:"timeline"` + Ephemeral struct { + Events []Event `json:"events"` + } `json:"ephemeral"` } `json:"join"` Invite map[string]struct { State struct { diff --git a/sync.go b/sync.go index c4bea48..ac326c3 100644 --- a/sync.go +++ b/sync.go @@ -64,6 +64,10 @@ func (s *DefaultSyncer) ProcessResponse(res *RespSync, since string) (err error) event.RoomID = roomID s.notifyListeners(&event) } + for _, event := range roomData.Ephemeral.Events { + event.RoomID = roomID + s.notifyListeners(&event) + } } for roomID, roomData := range res.Rooms.Invite { room := s.getOrCreateRoom(roomID)