summaryrefslogtreecommitdiff
path: root/plugins/bob.py
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/bob.py')
-rw-r--r--plugins/bob.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/bob.py b/plugins/bob.py
index be56ef4a..98c62901 100644
--- a/plugins/bob.py
+++ b/plugins/bob.py
@@ -37,7 +37,7 @@ class Plugin(BasePlugin):
default_config = {'bob': {'max_size': 2048, 'max_age': 86400}}
def init(self):
- for tab in tabs.ConversationTab, tabs.PrivateTab, tabs.MucTab:
+ for tab in tabs.DynamicConversationTab, tabs.StaticConversationTab, tabs.PrivateTab, tabs.MucTab:
self.api.add_tab_command(
tab,
'bob',
@@ -47,7 +47,7 @@ class Plugin(BasePlugin):
short='Send a short image',
completion=self.completion_bob)
- def command_bob(self, filename):
+ async def command_bob(self, filename):
path = Path(expanduser(filename))
try:
size = path.stat().st_size
@@ -67,7 +67,7 @@ class Plugin(BasePlugin):
with open(path.as_posix(), 'rb') as file:
data = file.read()
max_age = self.config.get('max_age')
- cid = self.core.xmpp.plugin['xep_0231'].set_bob(
+ cid = await self.core.xmpp.plugin['xep_0231'].set_bob(
data, mime_type, max_age=max_age)
self.api.run_command(
'/xhtml <img src="cid:%s" alt="%s"/>' % (cid, path.name))