Allow linking chats
This commit is contained in:
@@ -9,7 +9,7 @@ from django.views import View
|
||||
from mixins.views import ObjectList, ObjectRead
|
||||
|
||||
from core.clients import transport
|
||||
from core.models import Chat, PersonIdentifier
|
||||
from core.models import Chat, PersonIdentifier, PlatformChatLink
|
||||
from core.views.manage.permissions import SuperUserRequiredMixin
|
||||
|
||||
|
||||
@@ -199,6 +199,31 @@ class SignalChatsList(SuperUserRequiredMixin, ObjectList):
|
||||
),
|
||||
}
|
||||
)
|
||||
|
||||
for link in PlatformChatLink.objects.filter(
|
||||
user=self.request.user,
|
||||
service="signal",
|
||||
is_group=True,
|
||||
):
|
||||
group_id = str(link.chat_identifier or "").strip()
|
||||
if not group_id:
|
||||
continue
|
||||
rows.append(
|
||||
{
|
||||
"chat": None,
|
||||
"compose_page_url": "",
|
||||
"compose_widget_url": "",
|
||||
"ai_url": reverse("ai_workspace"),
|
||||
"person_name": "",
|
||||
"manual_icon_class": "fa-solid fa-users",
|
||||
"can_compose": False,
|
||||
"match_url": "",
|
||||
"is_group": True,
|
||||
"name": link.chat_name or group_id,
|
||||
"identifier": group_id,
|
||||
}
|
||||
)
|
||||
|
||||
return rows
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user