Add m.relates_to support in pong response content.
This commit is contained in:
parent
4d3f4f1556
commit
e9b4cd47a2
6
echo.py
6
echo.py
|
@ -52,6 +52,12 @@ class EchoBot(Plugin):
|
||||||
"from": evt.sender.split(":", 1)[1],
|
"from": evt.sender.split(":", 1)[1],
|
||||||
"ping": evt.event_id,
|
"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)
|
await evt.respond(content)
|
||||||
|
|
||||||
@command.new("echo", help="Repeat a message")
|
@command.new("echo", help="Repeat a message")
|
||||||
|
|
Loading…
Reference in a new issue