8go / matrix-eno-bot

An admin and personal assistence Matrix bot built on matrix-nio and nio-template
Apache License 2.0
88 stars 15 forks source link

How to verify device of the bot? #30

Open KeenMaron opened 2 years ago

KeenMaron commented 2 years ago

My service for the bot starts without any issue. The only problem is, how can i verify the bots device? I can send an emoji verification, but how can i answer the request with the bot? The instructions are not totally clear :/

KeenMaron commented 2 years ago

Additional information: I'm using element as android client and in windows also element client. I can't send an emoji verification over the android app. Over the windows app emoji verification is possible. The Android app tries to verfify through a unique code, there is no option to switch to emoji verification.

8go commented 2 years ago

Have a look again, Element on Android does support Emoji verification. Try again, I was able to do it.

8go commented 2 years ago

You should be able to verify the bot account anywhere (e.g. Elements client, Elements webpage) with any of its users. This is independent of matrix-eno-bot. This is plain account verification. It just so happens that "later" matrix-eno-bot then uses this Matrix bot account. I hope this help and gets you over the hurdle.

KeenMaron commented 2 years ago

But if the bot operates on a different device, than this devices isn't verfied yet?

8go commented 2 years ago

My above text was not phrased very well. The way I put it is not quite correct.

the eno bot does accept incoming emojii verification requests, once an incoming emoji verification request is received it will accept it. Turn on debugging and you should some debug info. The other device must issue the emojii verification request. This is the std way. The other device can be from the same user (cross device verification) or from a different user. You could start with verifying 2 devices of the same user (e.g. bot). E.g. the user bot has 2 devices: eno and element. Verify between bot device eno and bot device element by initiating the emoji verification request in Element Firefox. Then you can verify between user bot device element and other user john. Or you can verify between user bot device eno and other user john.

you might also set trust_own_devices: true.

FYI: This is written for a different project, but the gist is the same, the Firefox description where you find the emojii verification is the same.

Verification is best done as follows: Perform a cross- device verification, that means, perform a verification between two devices of the *same* user. For that, open (e.g.) Element in a browser, make sure Element is using the same user account as the matrix- commander user (specified with --user-login at --login). Now in the Element webpage go to the room that is the matrix-commander default room (specified with --room-default at --login). OK, in the web- browser you are now the same user and in the same room as matrix-commander. Now click the round 'i' 'Room Info' icon, then click 'People', click the appropriate user (the matrix-commander user), click red 'Not Trusted' text which indicated an untrusted device, then click the square 'Interactively verify by Emoji' button (one of 3 button choices). At this point both web-page and matrix-commander in terminal show a set of emoji icons and names. ... accepted ... You should see a green shield and also see that the matrix-commander device is now green and verified in the webpage. In the terminal you should see a text message indicating success. You should now be verified across all devices and across all users.