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

Encrypted rooms cannot send message #163

Open
catfromplan9 opened this issue Jan 19, 2024 · 3 comments
Open

Encrypted rooms cannot send message #163

catfromplan9 opened this issue Jan 19, 2024 · 3 comments

Comments

@catfromplan9
Copy link

Latest matrix-nio release, latest pantalaimon compiled from git (because your latest release has been broken for the last 12 or so months!). I have tried a few different configurations, but using git release of pantalaimon and latest stable release of matrix-nio seems to have least amount of problems. Reading encrypted rooms works fine. Sending and reading in unencrypted rooms works fine. Whenever I try to send a message to an encrypted room, I get a few "Missing session for device XXXXXXX" but nothing else until my client times out.

@catfromplan9
Copy link
Author

catfromplan9 commented Jan 19, 2024

Forgot to mention: Using pantalaimon 0.10.5 with matrix-nio 0.19.0 can send messages in some encrypted rooms, but half the unencrypted and encrypted rooms will not work and i get an immediate error from pantalaimon telling me it failed to sync when i send the message - The internal Pantalaimon client did not manage to sync with the server.. Additionally, if I start using pantalaimon with the matrix-nio 0.19.0, the device it creates on my account is not an encrypted one and so it won't work. Creating the session with an up to date matrix-nio and then downgrading it afterward resolves this. Using an up to date matrix-nio with pantalaimon 0.10.5 breaks media, as you know I'm sure.

@crisukbot
Copy link

I have the same problem. Do you know how to fix it?

@catfromplan9
Copy link
Author

I have the same problem. Do you know how to fix it?

Not a full fix, but here is the hacky solution I am happy with:

--- a/pantalaimon/daemon.py     2024-01-19 17:17:10.010235297 +0000
+++ b/pantalaimon/daemon.py     2024-01-19 17:17:21.477075027 +0000
@@ -940,8 +940,7 @@
         # Don't encrypt reactions for now - they are weird and clients
         # need to support them like this.
         # TODO: Fix when MSC1849 is fully supported by clients.
-        if request.match_info["event_type"] == "m.reaction":
-            encrypt = False
+        encrypt = False
 
         msgtype = request.match_info["event_type"]

I am using Gentoo, so I just placed this file in /etc/portage/patches/dev-python/pantalaimon/disable_encryption.patch and reinstalled it. This will disable encryption for all outgoing messages. Me personally, I don't mind doing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants