From 59b034737e575d3d1c7c1d65d2572a94cf0a8433 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Sat, 21 Jul 2018 19:55:03 +0200 Subject: [PATCH] buffer: Handle an empty user part of an user id. --- matrix/buffer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matrix/buffer.py b/matrix/buffer.py index 4f90886..51b739a 100644 --- a/matrix/buffer.py +++ b/matrix/buffer.py @@ -708,7 +708,7 @@ class RoomBuffer(object): short_name = shorten_sender(user.user_id) # TODO make this configurable - if short_name in self.displayed_nicks.values(): + if not short_name or short_name in self.displayed_nicks.values(): # Use the full user id, but don't include the @ nick = event.sender[1:] else: