matrix-org / pantalaimon

E2EE aware proxy daemon for matrix clients.
Apache License 2.0
293 stars 42 forks source link

Set Pantalaimon presence to offline #156

Closed codemonium closed 1 year ago

codemonium commented 1 year ago

Before this change, Pantalaimon users would always appear online because that is the default state [1, 2] when the /sync endpoint's set_presence parameter is not set. By explicitly setting the parameter to "offline", only the user-facing client (which executes its own /sync request) affects the presence state.

Aside: if sync_forever were to use "unavailable" instead of "offline", then affect_presence would be true, and the state column value would constantly toggle between online and unavailable whenever the user is logged in, rapidly incrementing the stream_id. Hence, "offline" is the only acceptable value to use in sync_forever.