From 6a73192c2490237f16e66cbad30d118fc567914b Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 6 Jul 2021 22:53:55 +0100 Subject: [PATCH] Tidying --- inbox.py | 2 +- notifyOnPost.py | 4 ++-- scripts/epicyon-notification | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/inbox.py b/inbox.py index c972a9288..0bf108c52 100644 --- a/inbox.py +++ b/inbox.py @@ -2526,8 +2526,8 @@ def _inboxAfterInitial(recentPostsCache: {}, maxRecentPosts: int, # save the post to file if saveJson(postJsonObject, destinationFilename): + # should we notify that a post from this person has arrived? if not postIsDM: - # should we notify that a post from this person has arrived? handleNickname = handle.split('@')[0] handleDomain = handle.split('@')[1] if notifyWhenPersonPosts(baseDir, nickname, domain, diff --git a/notifyOnPost.py b/notifyOnPost.py index 20bf927c2..2c40e7d2e 100644 --- a/notifyOnPost.py +++ b/notifyOnPost.py @@ -94,8 +94,8 @@ def notifyWhenPersonPosts(baseDir: str, nickname: str, domain: str, """ if followingNickname == nickname and followingDomain == domain: return False - notifyOnPostFilename = baseDir + '/accounts/' + \ - nickname + '@' + domain + '/notifyOnPost.txt' + notifyOnPostFilename = \ + baseDir + '/accounts/' + nickname + '@' + domain + '/notifyOnPost.txt' handle = followingNickname + '@' + followingDomain if not os.path.isfile(notifyOnPostFilename): # create a new notifyOnPost file diff --git a/scripts/epicyon-notification b/scripts/epicyon-notification index d8e0e54c6..d2f2c6301 100755 --- a/scripts/epicyon-notification +++ b/scripts/epicyon-notification @@ -219,12 +219,12 @@ function notifications { epicyonNotifyFile="$epicyonDir/.newNotifiedPost" if [ -f "$epicyonNotifyFile" ]; then if ! grep -q "##sent##" "$epicyonNotifyFile"; then - epicyonReplyMessage=$(notification_translate_text 'New post') - epicyonNotifyFileContent=$(echo "$epicyonReplyMessage")" "$(cat "$epicyonNotifyFile") + epicyonNotifyMessage=$(notification_translate_text 'New post') + epicyonNotifyFileContent=$(echo "$epicyonNotifyMessage")" "$(cat "$epicyonNotifyFile") if [[ "$epicyonNotifyFileContent" == *':'* ]]; then - epicyonReplyMessage="Epicyon: $epicyonNotifyFileContent" + epicyonNotifyMessage="Epicyon: $epicyonNotifyFileContent" fi - sendNotification "$USERNAME" "Epicyon" "$epicyonReplyMessage" + sendNotification "$USERNAME" "Epicyon" "$epicyonNotifyMessage" echo "##sent##" > "$epicyonNotifyFile" chown ${PROJECT_NAME}:${PROJECT_NAME} "$epicyonNotifyFile" fi