summaryrefslogtreecommitdiff
path: root/plugins/embed.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2020-05-09 22:58:17 +0200
committermathieui <mathieui@mathieui.net>2020-05-09 22:58:17 +0200
commitf68fa1da5e2cccd396ee03eec12359ff905b7bc6 (patch)
tree135acd2d1ed2a4e7e382d9bd4f574ef6f54a023e /plugins/embed.py
parentd22b4b8c218cbbaee62002d751bd69bfe1d1deab (diff)
parentca85411af06c59ec63b9cc2c0b2b2f398da79e8a (diff)
downloadpoezio-f68fa1da5e2cccd396ee03eec12359ff905b7bc6.tar.gz
poezio-f68fa1da5e2cccd396ee03eec12359ff905b7bc6.tar.bz2
poezio-f68fa1da5e2cccd396ee03eec12359ff905b7bc6.tar.xz
poezio-f68fa1da5e2cccd396ee03eec12359ff905b7bc6.zip
Merge branch 'split-message-rendering' into 'master'
split message rendering See merge request poezio/poezio!48
Diffstat (limited to 'plugins/embed.py')
-rw-r--r--plugins/embed.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/plugins/embed.py b/plugins/embed.py
index 0c4a4a2a..aee7d44b 100644
--- a/plugins/embed.py
+++ b/plugins/embed.py
@@ -16,6 +16,7 @@ Usage
from poezio import tabs
from poezio.plugin import BasePlugin
from poezio.theming import get_theme
+from poezio.ui.types import Message
class Plugin(BasePlugin):
@@ -37,11 +38,13 @@ class Plugin(BasePlugin):
if not isinstance(tab, tabs.MucTab):
message['type'] = 'chat'
tab.add_message(
- message['body'],
- nickname=tab.core.own_nick,
- nick_color=get_theme().COLOR_OWN_NICK,
- identifier=message['id'],
- jid=tab.core.xmpp.boundjid,
+ Message(
+ message['body'],
+ nickname=tab.core.own_nick,
+ nick_color=get_theme().COLOR_OWN_NICK,
+ identifier=message['id'],
+ jid=tab.core.xmpp.boundjid,
+ ),
typ=1,
)
message.send()