Commit e9190cac authored by Tijmen de Mes's avatar Tijmen de Mes

Fixed adding messages when id is missing

parent ec364b61
......@@ -687,9 +687,10 @@ class ChatWidget(base_class, ui_class):
return IconManager().get('avatar') or self.default_user_icon
def add_message(self, message):
exists = self.chat_element.findFirst(f'#text-{message.id}')
if not exists.isNull():
return
if hasattr(message, 'id'):
exists = self.chat_element.findFirst(f'#text-{message.id}')
if not exists.isNull():
return
insertion_point = self.chat_element.findFirst('#insert')
if message.is_related_to(self.last_message):
message.consecutive = True
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment