Implement m.image type in Client
parent
0542c5be10
commit
186e76cf57
|
@ -171,6 +171,11 @@ class Room(object):
|
|||
def send_emote(self, text):
|
||||
return self.client.api.send_emote(self.room_id, text)
|
||||
|
||||
def send_image(self, text, image=None, url=None, mimetype="image/jpeg"):
|
||||
if image:
|
||||
url = self.client.api.upload_media(mimetype, image.read())["content_uri"]
|
||||
return self.client.api.send_image(self.room_id, text, url)
|
||||
|
||||
def add_listener(self, callback):
|
||||
self.listeners.append(callback)
|
||||
|
||||
|
|
Loading…
Reference in New Issue