matrix-org / pantalaimon

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

Prevent downgrade on failed sync #103

Closed poljar closed 3 years ago

poljar commented 3 years ago

Pantalaimon depends on the room state to be present to decide correctly if a message should be encrypted or now. The room state is fetched from the server every time we restart, this means that failure to fetch room states from the server would hinder us from doing the correct decision.

This patch prevents a downgrade to sending unencrypted messages if we're unable to sync at least once with the server.