Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't add ephemeral events to timeline when peeking #1188

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -388,8 +388,10 @@ SyncApi.prototype._peekPoll = function(peekRoom, token) {
});

// strip out events which aren't for the given room_id (e.g presence)
// and also ephemeral events (which we're assuming is anything without
// and event ID because the /events API doesn't separate them).
const events = res.chunk.filter(function(e) {
return e.room_id === peekRoom.roomId;
return e.room_id === peekRoom.roomId && e.event_id;
}).map(self.client.getEventMapper());

peekRoom.addLiveEvents(events);
Expand Down