From 2f9d3a6ee7963de4e846724ce48899c92a3b1908 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=98=D0=B3=D0=BE=D1=80=D1=8C=20=D0=9D=D0=B0=D0=B4=D0=B5?= =?UTF-8?q?=D0=B8=D0=BD?= Date: Thu, 27 Nov 2025 17:36:58 +0300 Subject: [PATCH] =?UTF-8?q?Fix:=20=D1=83=D0=B1=D1=80=D0=B0=D0=BD=D0=B0=20?= =?UTF-8?q?=D0=BB=D0=B8=D1=88=D0=BD=D1=8F=D1=8F=20=D0=B7=D0=B0=D0=BF=D1=8F?= =?UTF-8?q?=D1=82=D0=B0=D1=8F=20=D0=B2=20=D0=B8=D0=BC=D0=B5=D0=BD=D0=B0?= =?UTF-8?q?=D1=85=20=D1=83=D1=87=D0=B0=D1=81=D1=82=D0=BD=D0=B8=D0=BA=D0=BE?= =?UTF-8?q?=D0=B2=20=D1=87=D0=B0=D1=82=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Исправлен шаблон chat_list.html для личных чатов - Использован {% cycle %} для правильного разделения имен участников - Теперь запятая не отображается перед первым именем --- backend/communications/notification_signals.py | 8 ++++---- backend/templates/communications/chat_list.html | 8 ++------ 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/backend/communications/notification_signals.py b/backend/communications/notification_signals.py index 63ebbe17..11fd4819 100644 --- a/backend/communications/notification_signals.py +++ b/backend/communications/notification_signals.py @@ -56,7 +56,7 @@ def create_message_notifications(sender, instance, created, **kwargs): title=f'Вас упомянул {author.get_full_name() or author.username}', message=truncate_message(content, 100), content_object=instance, - action_url=f'/communications/chat/{chat.id}/?message={instance.id}', + action_url=f'/communications/chats/{chat.id}/?message={instance.id}', metadata={ 'chat_id': chat.id, 'chat_name': get_chat_name(chat), @@ -80,7 +80,7 @@ def create_message_notifications(sender, instance, created, **kwargs): title=f'{author.get_full_name() or author.username} ответил на ваше сообщение', message=truncate_message(content, 100), content_object=instance, - action_url=f'/communications/chat/{chat.id}/?message={instance.id}', + action_url=f'/communications/chats/{chat.id}/?message={instance.id}', metadata={ 'chat_id': chat.id, 'chat_name': get_chat_name(chat), @@ -109,7 +109,7 @@ def create_message_notifications(sender, instance, created, **kwargs): title=f'Новое сообщение от {author.get_full_name() or author.username}', message=truncate_message(content, 100), content_object=instance, - action_url=f'/communications/chat/{chat.id}/', + action_url=f'/communications/chats/{chat.id}/', metadata={ 'chat_id': chat.id, 'chat_name': get_chat_name(chat), @@ -152,7 +152,7 @@ def create_chat_added_notifications(sender, instance, action, pk_set, **kwargs): title=f'Вас добавили в чат', message=f'Вы были добавлены в чат "{get_chat_name(chat)}"', content_object=chat, - action_url=f'/communications/chat/{chat.id}/', + action_url=f'/communications/chats/{chat.id}/', metadata={ 'chat_id': chat.id, 'chat_type': chat.type, diff --git a/backend/templates/communications/chat_list.html b/backend/templates/communications/chat_list.html index 08579915..84ee6ce5 100644 --- a/backend/templates/communications/chat_list.html +++ b/backend/templates/communications/chat_list.html @@ -187,12 +187,8 @@