Merge branch 'main' of ssh://code.freedombone.net:2222/bashrc/epicyon into main

main
Bob Mottram 2021-03-14 10:36:02 +00:00
commit 95227fa90d
2 changed files with 31 additions and 1 deletions

View File

@ -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 &

View File

@ -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: