Skip to content
Snippets Groups Projects
Verified Commit 0840d37f authored by Alexander Olofsson's avatar Alexander Olofsson
Browse files

Use MXID stringification for source in bot example

parent 33ffcc2a
No related branches found
No related tags found
No related merge requests found
...@@ -63,7 +63,6 @@ class MatrixBot ...@@ -63,7 +63,6 @@ class MatrixBot
} }
from_id = MatrixSdk::MXID.new(sender.id) from_id = MatrixSdk::MXID.new(sender.id)
from_str = "#{from_id.domain}#{from_id.port ? ":#{from_id.port}" : ''}"
eventdata = { eventdata = {
body: format(plaintext, formatdata), body: format(plaintext, formatdata),
...@@ -71,7 +70,7 @@ class MatrixBot ...@@ -71,7 +70,7 @@ class MatrixBot
formatted_body: format(html, formatdata), formatted_body: format(html, formatdata),
msgtype: 'm.notice', msgtype: 'm.notice',
pong: { pong: {
from: from_str, from: from_id.homeserver,
ms: formatdata[:time], ms: formatdata[:time],
ping: formatdata[:event] ping: formatdata[:event]
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment