Implement contact matching

This commit is contained in:
2026-02-15 23:48:32 +00:00
parent 1e83c800f8
commit d9491ae817
12 changed files with 667 additions and 46 deletions

View File

@@ -3,6 +3,7 @@ import requests
from django.conf import settings
from django.shortcuts import render
from django.urls import reverse
from urllib.parse import urlencode
from django.views import View
from mixins.views import ObjectList, ObjectRead
@@ -67,6 +68,8 @@ class SignalAccounts(SuperUserRequiredMixin, ObjectList):
"service_label": label,
"account_add_url_name": add_url_name,
"show_contact_actions": show_contact_actions,
"contacts_url_name": f"{service}_contacts",
"chats_url_name": f"{service}_chats",
"endpoint_base": str(
getattr(settings, "SIGNAL_HTTP_URL", "http://signal:8080")
).rstrip("/")
@@ -187,6 +190,12 @@ class SignalChatsList(SuperUserRequiredMixin, ObjectList):
),
"manual_icon_class": "fa-solid fa-paper-plane",
"can_compose": bool(compose_page_url),
"match_url": (
f"{reverse('compose_contact_match')}?"
f"{urlencode({'service': 'signal', 'identifier': identifier_value})}"
if identifier_value
else reverse("compose_contact_match")
),
}
)
return rows