Fix bridging and refactor
This commit is contained in:
@@ -119,16 +119,17 @@ class PersonIdentifier(models.Model):
|
||||
def __str__(self):
|
||||
return f"{self.person} ({self.service})"
|
||||
|
||||
def send(self, text, attachments=[]):
|
||||
async def send(self, text, attachments=[]):
|
||||
"""
|
||||
Send this contact a text.
|
||||
"""
|
||||
if self.service == "signal":
|
||||
ts = signalapi.send_message_raw_sync(
|
||||
ts = await signalapi.send_message_raw(
|
||||
self.identifier,
|
||||
text,
|
||||
attachments,
|
||||
)
|
||||
print("SENT")
|
||||
return ts
|
||||
else:
|
||||
raise NotImplementedError(f"Service not implemented: {self.service}")
|
||||
|
||||
Reference in New Issue
Block a user