Use correct option to send to lone user

This commit is contained in:
Théophile Bastian 2024-03-01 15:08:22 +01:00
parent f5a212cc71
commit 9a80d644d2

View file

@ -11,7 +11,7 @@ def signal_send(recipients: list[str], message: str) -> None:
def to_dest(recipient: str) -> dict[str, str]:
if recipient.startswith("G:"):
return {"groupId": recipient[2:]}
return {"userId": recipient}
return {"recipient": [recipient]}
with socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) as signal_json:
signal_json.connect(configuration.SIGNAL_SOCKET)