matrix-org / pantalaimon

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

Scrollback/History/Backlog of encrypted messages missing #117

Closed fauxmight closed 2 years ago

fauxmight commented 2 years ago

Describe the bug Pantalaimon works correctly as far as I can tell but no backlog or scrollback or history is available to Fractal or other downstream clients of Pantalaimon. NEW encrypted messages are sent and received correctly. If this is expected behaviour, I will close the issue. If not, I would appreciate any pointers. I have read through and realize that "Indexing" in Pantalaimon refers to making history searchable and that this is no longer a regular use of Pantalaimon since the tantivy API change and the subsequent removal of the search feature from Pantalaimon. If, for this reason, no backlog/history is accessible, that may explain this issue.

Even (encrypted) messages sent from other users/devices and RECEIVED within a Pantalaimon-connected Fractal session are completely gone if one closes (without logging out) and then reopens Fractal while Pantalaimon continues running uninterrupted.

This ONLY applies to ENCRYPTED messages -- regardless of whether IndexEncryptedOnly is set to False or True. A backlog or history of UNENCRYPTED messages is viewable as expected.

pantalaimon.conf:

` [Default] LogLevel = Debug Notifications = On UseKeyring = Yes

[local-matrix] Homeserver = https://my.actual.homeserver.address ListenAddress = localhost ListenPort = 8009 IndexingBatchSize = 100 IndexEncryptedOnly = False SearchRequests = On DropOldKeys = No `

To Reproduce Steps to reproduce the behavior:

  1. Set up pantalaimon and run pantalaimon
  2. Retrieve keys and import/export keys as described in the documentation
  3. verify-device for appropriate devices
  4. Set homeserver in Fractal to the local pantalaimon server and start Fractal
  5. Select an existing ENCRYPTED room or private chat in Fractal
  6. Note that no history or scrollback or backlog of messages (whether received during the current pantalaimon session or before) is available.

Expected behavior History/backlog/scrollback (it is unclear which term is preferred in matrix) should be available to a downstream client of pantalaimon.

Desktop (please complete the following information):

Smartphone (please complete the following information):

poljar commented 2 years ago

This is a regression stemming from #105. Will work on a fix.