Add m.relates_to support in pong response content.

This commit is contained in:
Jason Volk 2019-12-09 10:49:53 -08:00 committed by Tulir Asokan
parent 4d3f4f1556
commit e9b4cd47a2

View file

@ -52,6 +52,12 @@ class EchoBot(Plugin):
"from": evt.sender.split(":", 1)[1],
"ping": evt.event_id,
}
content["m.relates_to"] = {
"rel_type": "pong",
"event_id": evt.event_id,
"from": evt.sender.split(":", 1)[1],
"ms": diff,
}
await evt.respond(content)
@command.new("echo", help="Repeat a message")