From b0313a4c204e03a70479a0b969c0ebe2ed4a8470 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 14 Mar 2021 10:09:09 +0000 Subject: [PATCH 1/2] default target --- install-desktop-notifications | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install-desktop-notifications b/install-desktop-notifications index 460efdd1c..b52b36bc0 100755 --- a/install-desktop-notifications +++ b/install-desktop-notifications @@ -83,7 +83,7 @@ fi echo 'RemainAfterExit=yes'; echo ''; echo '[Install]'; - echo 'WantedBy=multi-user.target'; } > "${HOME}/.config/systemd/user/epicyon-notifications.service" + echo 'WantedBy=default.target'; } > "${HOME}/.config/systemd/user/epicyon-notifications.service" systemctl --user enable epicyon-notifications.service systemctl --user daemon-reload systemctl --user restart epicyon-notifications.service & From 7c9a26f4a33ad2176759c81c45757f4cd10898f0 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 14 Mar 2021 10:28:48 +0000 Subject: [PATCH 2/2] Can send DMs to multiple handles --- notifications_client.py | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/notifications_client.py b/notifications_client.py index 2e9712a86..3b6198e6a 100644 --- a/notifications_client.py +++ b/notifications_client.py @@ -410,6 +410,36 @@ def _notificationNewDM(session, toHandle: str, screenreader: str, systemLanguage: str, espeak) -> None: """Use the notification client to create a new direct message + which can include multiple destination handles + """ + if ' ' in toHandle: + handlesList = toHandle.split(' ') + elif ',' in toHandle: + handlesList = toHandle.split(',') + elif ';' in toHandle: + handlesList = toHandle.split(';') + else: + handlesList = [toHandle] + + for handle in handlesList: + handle = handle.strip() + _notificationNewDMbase(session, handle, + baseDir, nickname, password, + domain, port, httpPrefix, + cachedWebfingers, personCache, + debug, + screenreader, systemLanguage, + espeak) + + +def _notificationNewDMbase(session, toHandle: str, + baseDir: str, nickname: str, password: str, + domain: str, port: int, httpPrefix: str, + cachedWebfingers: {}, personCache: {}, + debug: bool, + screenreader: str, systemLanguage: str, + espeak) -> None: + """Use the notification client to create a new direct message """ toPort = port if '://' in toHandle: