Implement bridging Signal and XMPP

This commit is contained in:
2025-02-23 18:34:03 +00:00
parent 8d2f28f571
commit b2b44c31cc
5 changed files with 325 additions and 46 deletions

View File

@@ -119,14 +119,15 @@ class PersonIdentifier(models.Model):
def __str__(self):
return f"{self.person} ({self.service})"
def send(self, text):
def send(self, text, attachments=[]):
"""
Send this contact a text.
"""
if self.service == "signal":
ts = signalapi.send_message_raw_sync(
self.identifier,
text
text,
attachments,
)
return ts
else: