Skip to content

verification failed #198

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

Open
doudz opened this issue May 9, 2025 · 0 comments
Open

verification failed #198

doudz opened this issue May 9, 2025 · 0 comments

Comments

@doudz
Copy link

doudz commented May 9, 2025

using version 8.0.4, verification failed with the following error

Traceback (most recent call last):
  File "/home/user/app/.venv/lib/python3.12/site-packages/matrix_commander/matrix_commander.py", line 1248, in to_device_callback
    "transaction_id": event.transaction_id,
                      ^^^^^^^^^^^^^^^^^^^^
AttributeError: 'UnknownToDeviceEvent' object has no attribute 'transaction_id'

I fixed this by replacing

sas = client.key_verifications[event.transaction_id]

                done_message = ToDeviceMessage(
                    type="m.key.verification.done",
                    recipient=event.sender,
                    recipient_device=sas.other_olm_device.device_id,
                    content={
                        "transaction_id": event.transaction_id,
                    },
                )

with

sas = client.key_verifications[event.source['content']['transaction_id']]

                done_message = ToDeviceMessage(
                    type="m.key.verification.done",
                    recipient=event.sender,
                    recipient_device=sas.other_olm_device.device_id,
                    content={
                        "transaction_id": event.source['content']['transaction_id'],
                    },
                )
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

1 participant