Skip to content

verification failed #198

@doudz

Description

@doudz

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'],
                    },
                )

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions