mirror of
https://gitlab.com/bashrc2/epicyon
synced 2026-11-02 18:59:53 +00:00
Notify about emoji reactions
This commit is contained in:
1 parent
f36000246d
commit
6b86c83db0
21 files changed
+105
-30
No files matched your search
@@ -215,6 +215,21 @@ function notifications {
|
||||
fi
|
||||
fi
|
||||
|
||||
# send notifications for emoji reactions to XMPP/email users
|
||||
epicyonLikeFile="$epicyonDir/.newReaction"
|
||||
if [ -f "$epicyonReactionFile" ]; then
|
||||
if ! grep -q "##sent##" "$epicyonReactionFile"; then
|
||||
epicyonReactionMessage=$(notification_translate_text 'Reaction by')
|
||||
epicyonReactionFileContent=$(cat "$epicyonReactionFile" | awk -F ' ' '{print $1}')" "$(echo "$epicyonReactionMessage")" "$(cat "$epicyonReactionFile" | awk -F ' ' '{print $2}')
|
||||
if [[ "$epicyonReactionFileContent" == *':'* ]]; then
|
||||
epicyonReactionMessage="Epicyon: $epicyonReactionFileContent"
|
||||
fi
|
||||
sendNotification "$USERNAME" "Epicyon" "$epicyonReactionMessage"
|
||||
echo "##sent##" > "$epicyonReactionFile"
|
||||
chown ${PROJECT_NAME}:${PROJECT_NAME} "$epicyonReactionFile"
|
||||
fi
|
||||
fi
|
||||
|
||||
# send notifications for posts arriving from a particular person
|
||||
epicyonNotifyFile="$epicyonDir/.newNotifiedPost"
|
||||
if [ -f "$epicyonNotifyFile" ]; then
|
||||
|
||||
Reference in new issue
Block a user