From 3c86ecfa4f111f463230d40a7214b2bd3ffdc3e3 Mon Sep 17 00:00:00 2001 From: qo-op Date: Mon, 16 Mar 2020 01:15:07 +0100 Subject: [PATCH] pass likes on private messages --- process-likes-g1tx.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/process-likes-g1tx.sh b/process-likes-g1tx.sh index 9fa3f03..81deecc 100755 --- a/process-likes-g1tx.sh +++ b/process-likes-g1tx.sh @@ -114,6 +114,13 @@ normal=$(tput sgr0) sbotc query.read '{"query":[{"$filter":{"value":{"author":"'"$self"'","content":{"type":"vote", "vote":{"expression":"Like"}},"timestamp":{"$gt":'"$last_ts"'}}}}]}' | while read -r msg do + priv=$(printf %s "$msg" | jq .value.content.private) + if [[ $priv == true ]] + then + printf "Private message $priv, continue to next one\n" >&2 + continue + fi + if ! ts=$(printf %s "$msg" | jq -r .value.timestamp) then printf 'Unable to get message timestamp\n' >&2