get zenyta message types received from http://localhost:10011/REC/youtube-dl.php
This commit is contained in:
parent
72a6a7bef6
commit
a95046ae0b
|
@ -16,7 +16,7 @@ ME="${0##*/}"
|
|||
####
|
||||
export YOU=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1) || er+=" ipfs daemon not running"
|
||||
export IPFSNODEID=$(ipfs id -f='<id>\n') || er+=" ipfs id problem"
|
||||
export WHOAMI=$($MY_PATH/zen/tools/timeout.sh -t 3 sbotc whoami | jq -r .id) || er+=" sbotc whoami problem"
|
||||
export WHOAMI=$($MY_PATH/zen/tools/timeout.sh -t 3 sbotc whoami | jq -r .id) || er+=" sbotc whoami problem" # HAPPENS WHEN no ssb-server / patchork runs
|
||||
[[ "$YOU" == "" || "$IPFSNODEID" == "" || "$WHOAMI" == "" ]] && echo "ERROR : $er " && exit 1
|
||||
########################################################################
|
||||
# HELP DEVLT: Search "TODO" in code
|
||||
|
|
|
@ -51,7 +51,7 @@ a u d i o
|
|||
#messages=$(sbotc messagesByType '{"type":"post","gt":'$last_ts'}')
|
||||
# SEARCH "#zenyta" CMD in message text
|
||||
messages=$(sbotc backlinks.read '{"query":[{"$filter":{"dest":"#zenyta","value":{"content":{"type":"post"}},"timestamp":{"$gt":'"$last_ts"'}}}]}')
|
||||
[[ $messages == "" ]] && exit 1
|
||||
[[ $messages == "" ]] && messages=$(sbotc query.read '{"query":[{"$filter":{"value":{"author": "'"$WHOAMI"'", "content":{"type":"zenyta"}}}}]}') || exit 1
|
||||
while read -r msg
|
||||
do
|
||||
# EXTRACT CMD PARAM
|
||||
|
|
Loading…
Reference in New Issue