hangups icon indicating copy to clipboard operation
hangups copied to clipboard

Add support for observed events

Open tdryer opened this issue 7 years ago • 5 comments

Observed events appear to be a new way of tracking which events have been read by users. Add support for conversations/markeventobserved and EVENT_TYPE_OBSERVED_EVENT in hangups.

tdryer avatar Jul 19 '16 03:07 tdryer

@tdryer @EionRobb Any idea what the semantic difference is between conversations/markeventobserved and conversations/updatewatermark?

avaidyam avatar Jan 28 '18 21:01 avaidyam

UpdateWatermark is to let the server know where you've read up until, and shows as the marker-line in conversations on the web. MarkEventObserved is to tell the server that we've ack'd specific events, such as the conversation name being changed, or users being removed from the conversation (includes receiving messages too).

Its possible to observe an event without changing the watermark, eg if a user is DND or is active in multiple devices

EionRobb avatar Jan 28 '18 22:01 EionRobb

What's the drawback of just ignoring markeventobserved though? Isn't the app supposed to manage and sync state without the server getting involved?

avaidyam avatar Jan 29 '18 04:01 avaidyam

I ignore it in purple-hangouts. Haven't noticed any issues.

EionRobb avatar Jan 29 '18 04:01 EionRobb

I think if you ignore the "observed" events, they'll pile up and the server will keep trying to send them. I noticed that hangups gets a lot of extra events when it starts up because the observed events aren't counted towards max_events_per_conversation when loading conversations.

tdryer avatar Jan 30 '18 03:01 tdryer