Skylar-Tech / node-red-contrib-matrix-chat

Matrix chat server support for Node-RED
GNU General Public License v3.0
31 stars 10 forks source link

Error sending response to the private room -- unverified device #118

Open saket424 opened 5 days ago

saket424 commented 5 days ago

@skylord123 I created a new bot user and plugged it into the flow that auto accepts and joins the room that it was invited into

when it is supposed to respond to "users", while it successfully receives the message and decrypts it, when it tries to respond, I get this error about the existence of an unverified device (which is the bot user using nodered)

msg : string[164] "Error sending message: UnknownDeviceError: This room contains unknown devices which have not been verified. We strongly recommend you verify them before continuing.

I am using synapse 1.113

do you recommend any remedy for this end2end encrypted private room ?

skylord123 commented 4 days ago

87 #93 are both related to this. There currently is no way to verify devices within this module. The matrix-js-sdk docs are quite sparse on any specifics about how to handle this. I believe I have a working version on a branch but I am not sure if the implementation is correct.

If you want to find out more information we had a conversation about this on the matrix room here: https://matrix.to/#/!ppQOFZPDOZdYkxhyRo:skylar.tech/$LpIQ9XmTe0VVj9TThKwLHqwfKbrAwfSdamXLTQOdkhk?via=skylar.tech&via=matrix.org&via=chat.rios.org.br

If anyone wants to help add this functionality pull requests are welcome.

saket424 commented 4 days ago

@skylord123 There is a new bot implementation that uses the rust sdk https://github.com/etkecc/baibot/blob/main/etc/app/config.yml.dist that appears to work well. Could you check your implementation against that ?

saket424 commented 4 days ago

There is an upcoming matrix conference that I am looking forward to attending online https://cfp.matrix.org/matrixconf2024/talk/9BCM3A/

I believe they recommend the use of the rust crypto sdk even for non-rust uses

saket424 commented 4 days ago

@skylord123 I assume you are aware of this projects that abstracts all the crypto layer to the rust sdk https://github.com/matrix-org/matrix-rust-sdk-crypto-nodejs

saket424 commented 4 days ago

Here is a related YouTube video that is still over my head that may help others https://youtu.be/F3_Y02A53Zc?feature=shared

skylord123 commented 2 days ago

@skylord123 I assume you are aware of this projects that abstracts all the crypto layer to the rust sdk https://github.com/matrix-org/matrix-rust-sdk-crypto-nodejs

Yeah this is planned for next release. Created #122 for tracking this. libolm is being deprecated so we have to switch to rust crypto.

Once I get that working I can look into trying device verification on the latest.