Minor style fixes

This commit is contained in:
Tulir Asokan
2018-02-16 17:36:50 +02:00
parent c80738e63d
commit 57e1a863dc
3 changed files with 4 additions and 6 deletions
+2 -2
View File
@@ -690,7 +690,7 @@ class Portal:
name = media.caption
await intent.set_typing(self.mxid, is_typing=False)
return await intent.send_image(self.mxid, uploaded["content_uri"], info=info,
text=name)
text=name)
def convert_webp(self, file, to="png"):
try:
@@ -733,7 +733,7 @@ class Portal:
type = "m.image"
await intent.set_typing(self.mxid, is_typing=False)
return await intent.send_file(self.mxid, uploaded["content_uri"], info=info,
text=name, file_type=type)
text=name, file_type=type)
def handle_telegram_location(self, source, intent, location):
long = location.long
-2
View File
@@ -69,8 +69,6 @@ class Puppet:
if self.username else 0)
displayname_similarity = (SequenceMatcher(None, self.displayname, query).ratio()
if self.displayname else 0)
#phone_number_similarity = (SequenceMatcher(None, self.phone_number, query).ratio()
# if self.phone_number else 0)
similarity = max(username_similarity, displayname_similarity)
return round(similarity * 1000) / 10
+2 -2
View File
@@ -46,8 +46,8 @@ class MautrixTelegramClient(TelegramClient):
return self._get_response_message(request, result)
async def send_file(self, entity, file, mime_type=None, caption=None, attributes=None, file_name=None,
reply_to=None, **kwargs):
async def send_file(self, entity, file, mime_type=None, caption=None, attributes=None,
file_name=None, reply_to=None, **kwargs):
entity = await self.get_input_entity(entity)
reply_to = self._get_reply_to(reply_to)