Send messages to one recipient at a time

This commit is contained in:
Théophile Bastian 2022-10-31 13:27:01 +01:00
parent a5576a83c7
commit f880feccb3

View file

@ -9,10 +9,11 @@ def signal_send(recipients, message):
try: try:
bus = SystemBus() bus = SystemBus()
signal_bus = bus.get("org.asamk.Signal") signal_bus = bus.get("org.asamk.Signal")
signal_bus.sendMessage( for recipient in recipients:
message, signal_bus.sendMessage(
[], message,
recipients, [],
) recipient,
)
except GError as exn: except GError as exn:
logger.error("Cannot send Signal notification: %s", exn) logger.error("Cannot send Signal notification: %s", exn)