diff --git a/bin/lib/chats_viewer.py b/bin/lib/chats_viewer.py index 3845a493..4e91f47c 100755 --- a/bin/lib/chats_viewer.py +++ b/bin/lib/chats_viewer.py @@ -307,7 +307,6 @@ def api_get_chat(chat_id, chat_instance_uuid): meta = chat.get_meta({'created_at', 'img', 'info', 'subchannels', 'username'}) if meta['username']: meta['username'] = get_username_meta_from_global_id(meta['username']) - print() if meta['subchannels']: meta['subchannels'] = get_subchannels_meta_from_global_id(meta['subchannels']) else: @@ -321,8 +320,8 @@ def api_get_subchannel(chat_id, chat_instance_uuid): meta = subchannel.get_meta({'chat', 'created_at', 'img', 'nb_messages'}) if meta['chat']: meta['chat'] = get_chat_meta_from_global_id(meta['chat']) - if meta['username']: - meta['username']: + if meta.get('username'): + meta['username'] = get_username_meta_from_global_id(meta['username']) meta['messages'], meta['tags_messages'] = subchannel.get_messages() return meta, 200 diff --git a/var/www/templates/chats_explorer/SubChannelMessages.html b/var/www/templates/chats_explorer/SubChannelMessages.html index 53a3deef..198ad504 100644 --- a/var/www/templates/chats_explorer/SubChannelMessages.html +++ b/var/www/templates/chats_explorer/SubChannelMessages.html @@ -54,7 +54,7 @@