Allow linking chats
This commit is contained in:
@@ -34,6 +34,7 @@ from core.models import (
|
||||
PatternMitigationRule,
|
||||
Person,
|
||||
PersonIdentifier,
|
||||
PlatformChatLink,
|
||||
QueuedMessage,
|
||||
WorkspaceConversation,
|
||||
WorkspaceMetricSnapshot,
|
||||
@@ -3538,6 +3539,24 @@ class AIWorkspaceContactsWidget(LoginRequiredMixin, View):
|
||||
}
|
||||
)
|
||||
rows.sort(key=lambda row: row["last_ts"] or 0, reverse=True)
|
||||
|
||||
for link in PlatformChatLink.objects.filter(user=user, is_group=True).order_by(
|
||||
"service", "chat_name"
|
||||
):
|
||||
rows.append(
|
||||
{
|
||||
"person": None,
|
||||
"is_group": True,
|
||||
"chat_name": link.chat_name or link.chat_identifier,
|
||||
"service": link.service,
|
||||
"chat_identifier": link.chat_identifier,
|
||||
"message_count": 0,
|
||||
"last_text": "",
|
||||
"last_ts": None,
|
||||
"last_ts_label": "",
|
||||
}
|
||||
)
|
||||
|
||||
return rows
|
||||
|
||||
def get(self, request, type):
|
||||
|
||||
Reference in New Issue
Block a user