Merge branch 'master' of https://github.com/poljar/weechat-matrix
This commit is contained in:
commit
6081b7eded
2 changed files with 7 additions and 2 deletions
|
@ -113,7 +113,7 @@ class EncryptedUpload(Upload):
|
|||
self.source_mimetype = self.mimetype
|
||||
self.mimetype = "application/octet-stream"
|
||||
|
||||
with open(self.filename, "rb") as file:
|
||||
with open(self.file, "rb") as file:
|
||||
self.ciphertext, self.file_keys = encrypt_attachment(file.read())
|
||||
|
||||
def send_progress(self):
|
||||
|
|
|
@ -1068,11 +1068,14 @@ class RoomBuffer(object):
|
|||
# freenode bridge users better
|
||||
if (user.user_id.startswith("@_discord_") or
|
||||
user.user_id.startswith("@_slack_") or
|
||||
user.user_id.startswith("@_discordpuppet_") or
|
||||
user.user_id.startswith("@_slackpuppet_") or
|
||||
user.user_id.startswith("@whatsapp_") or
|
||||
user.user_id.startswith("@facebook_") or
|
||||
user.user_id.startswith("@telegram_") or
|
||||
user.user_id.startswith("@_telegram_") or
|
||||
user.user_id.startswith("@_xmpp_")):
|
||||
user.user_id.startswith("@_xmpp_") or
|
||||
user.user_id.startswith("@irc_")):
|
||||
if user.display_name:
|
||||
short_name = user.display_name[0:50]
|
||||
elif user.user_id.startswith("@twilio_"):
|
||||
|
@ -1081,6 +1084,8 @@ class RoomBuffer(object):
|
|||
short_name = shorten_sender(user.user_id[9:])
|
||||
elif user.user_id.startswith("@_ircnet_"):
|
||||
short_name = shorten_sender(user.user_id[8:])
|
||||
elif user.user_id.startswith("@_oftc_"):
|
||||
short_name = shorten_sender(user.user_id[6:])
|
||||
elif user.user_id.startswith("@gitter_"):
|
||||
short_name = shorten_sender(user.user_id[7:])
|
||||
|
||||
|
|
Loading…
Reference in a new issue