diff --git a/matrix/buffer.py b/matrix/buffer.py index b4a64c0..a07f4ea 100644 --- a/matrix/buffer.py +++ b/matrix/buffer.py @@ -790,6 +790,14 @@ class RoomBuffer(object): short_name = shorten_sender(user.user_id) + # TODO handle this special case for discord bridge users and + # freenode bridge users better + if user.user_id.startswith("@_discord_"): + if user.display_name: + short_name = user.display_name + elif user.user_id.startswith("@freenode_"): + short_name = shorten_sender(user.user_id[10:]) + # TODO make this configurable if not short_name or short_name in self.displayed_nicks.values(): # Use the full user id, but don't include the @