-
Notifications
You must be signed in to change notification settings - Fork 72
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
Support encryption #7
Comments
This is solved by c91eb52 ? |
No? There's more to encryption than pantalaimon. |
We've made encryption progress with matrix-js-sdk in our bot here: |
that said, it has some issues... would love to get this integrated into your sdk, so we can move to using it and all improve this code together. |
Could this limitation get some sort of mention in the readme, or anywhere else in the docs? I just spent over an hour trying to figure out why the echobot example wasn't working for me -- authentication and auto-joining go fine, but then the bot just doesn't receive any events whatsoever after that. This is also an especially frustrating issue to troubleshoot when you don't know what's causing it: Turning the log level all the way up to TRACE made it clear that the library was getting something whenever I sent a message, but I added listeners for every type of event I could find in the docs and none of them ever fired. I'm not sure if there's anything else I could have done to get some sort of event or exception to let me know that a message the bot has received is encrypted and therefore can't be read, but that's probably something I'll want to be able to handle at some point. The homeserver I'm using has E2E encryption enabled by default for private chats (which I believe is the out-of-the-box default for Synapse now), so I didn't even think about it until I found this issue. As soon as I added the bot to a new room with encryption disabled, everything started working as expected. |
I realized something working with the new Android SDK2 and the JS SDK in a browser context... when it comes to encrypted messages, you really don't want to be handling incoming events with callbacks. It is better to query the timeline to get to your message backlog. In essence, the event callback should be thought of as a ping, and then you can check the synced timeline for messages you haven't processed yet in your bot, and see if you can decrypt them yet. At some point, once all the remote devices/keys are synced, you will be able to decrypt the message. Often, that can come after you receive the event for the encrypted message payload. |
Includes v0.6.4+patches (not yet released as v0.6.5 upstream)
No description provided.
The text was updated successfully, but these errors were encountered: