Even more data structure woes

This commit is contained in:
Astra Logical 2026-07-23 10:55:58 -04:00
parent 6fce9ee607
commit 9655f67953

View file

@ -157,14 +157,12 @@ async def on_to_device(client: AsyncClient, event):
"transaction_id": tx_id,
}
# Wrap the event type and dictionary in a ToDeviceMessage object
# Pass the event type, recipient, device, and content payload as separate arguments
message = ToDeviceMessage(
"m.key.verification.ready",
{
event.sender: {
from_device: ready_content
}
}
event.sender, # recipient (positional argument 2)
from_device, # recipient_device (positional argument 3)
ready_content # content (positional argument 4)
)
resp = await client.to_device(message)