forked from axiom-team/ssb-g1-tip
pass likes on private messages
This commit is contained in:
parent
7e1ee5fd6b
commit
3c86ecfa4f
|
@ -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
|
sbotc query.read '{"query":[{"$filter":{"value":{"author":"'"$self"'","content":{"type":"vote", "vote":{"expression":"Like"}},"timestamp":{"$gt":'"$last_ts"'}}}}]}' | while read -r msg
|
||||||
do
|
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)
|
if ! ts=$(printf %s "$msg" | jq -r .value.timestamp)
|
||||||
then
|
then
|
||||||
printf 'Unable to get message timestamp\n' >&2
|
printf 'Unable to get message timestamp\n' >&2
|
||||||
|
|
Loading…
Reference in New Issue