diff options
Diffstat (limited to 'plugins/embed.py')
-rw-r--r-- | plugins/embed.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/embed.py b/plugins/embed.py index 9895a927..0c4a4a2a 100644 --- a/plugins/embed.py +++ b/plugins/embed.py @@ -28,14 +28,13 @@ class Plugin(BasePlugin): help='Embed an image url into the contact\'s client', usage='<image_url>') - def embed_image_url(self, args): + def embed_image_url(self, url): tab = self.api.current_tab() message = self.core.xmpp.make_message(tab.jid) - message['body'] = args - message['oob']['url'] = args - if isinstance(tab, tabs.MucTab): - message['type'] = 'groupchat' - else: + message['body'] = url + message['oob']['url'] = url + message['type'] = 'groupchat' + if not isinstance(tab, tabs.MucTab): message['type'] = 'chat' tab.add_message( message['body'], @@ -46,3 +45,4 @@ class Plugin(BasePlugin): typ=1, ) message.send() + self.core.refresh_window() |