From 1b54b671542747e22c5ec46e33d63b2e5a012ec7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Mon, 11 Mar 2019 16:26:29 +0100 Subject: [PATCH] buffer: Add more bridged username workarounds. --- matrix/buffer.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/matrix/buffer.py b/matrix/buffer.py index cce69dc..988e301 100644 --- a/matrix/buffer.py +++ b/matrix/buffer.py @@ -1013,13 +1013,16 @@ class RoomBuffer(object): # freenode bridge users better if (user.user_id.startswith("@_discord_") or user.user_id.startswith("@_slack_") or - user.user_id.startswith("@whatsapp_")): + user.user_id.startswith("@whatsapp_") or + user.user_id.startswith("@_xmpp_")): if user.display_name: short_name = user.display_name[0:50] elif user.user_id.startswith("@freenode_"): 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("@gitter_"): + short_name = shorten_sender(user.user_id[7:]) # TODO make this configurable if not short_name or short_name in self.displayed_nicks.values():