Add shortname for twilio, telegram, messenger bridge

This commit is contained in:
Thomas 2019-04-06 00:57:47 +05:30
parent 5062c4cbd6
commit db8bc325b4
No known key found for this signature in database
GPG key ID: EF9A5C8ABCF6AC69

View file

@ -1017,9 +1017,13 @@ class RoomBuffer(object):
if (user.user_id.startswith("@_discord_") or
user.user_id.startswith("@_slack_") or
user.user_id.startswith("@whatsapp_") or
user.user_id.startswith("@facebook_") or
user.user_id.startswith("@telegram_") or
user.user_id.startswith("@_xmpp_")):
if user.display_name:
short_name = user.display_name[0:50]
elif user.user_id.startswith("@twilio_"):
short_name = shorten_sender(user.user_id[7:])
elif user.user_id.startswith("@freenode_"):
short_name = shorten_sender(user.user_id[9:])
elif user.user_id.startswith("@_ircnet_"):