Even more data structure woes
This commit is contained in:
parent
6fce9ee607
commit
9655f67953
1 changed files with 4 additions and 6 deletions
|
|
@ -157,14 +157,12 @@ async def on_to_device(client: AsyncClient, event):
|
||||||
"transaction_id": tx_id,
|
"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(
|
message = ToDeviceMessage(
|
||||||
"m.key.verification.ready",
|
"m.key.verification.ready",
|
||||||
{
|
event.sender, # recipient (positional argument 2)
|
||||||
event.sender: {
|
from_device, # recipient_device (positional argument 3)
|
||||||
from_device: ready_content
|
ready_content # content (positional argument 4)
|
||||||
}
|
|
||||||
}
|
|
||||||
)
|
)
|
||||||
|
|
||||||
resp = await client.to_device(message)
|
resp = await client.to_device(message)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue