Implement m.image type in Client

Ryan Rix 2015-11-16 01:57:43 +00:00
parent 0542c5be10
commit 186e76cf57
1 changed files with 5 additions and 0 deletions

View File

@ -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,["content_uri"]
return self.client.api.send_image(self.room_id, text, url)
def add_listener(self, callback):