getting better
This commit is contained in:
parent
3a66115982
commit
e0398bb2f0
|
@ -53,21 +53,19 @@ self=$(sbotc whoami | jq -r .id) || exit 1
|
|||
g1self=$(echo $self | cut -d '@' -f 2 | cut -d '.' -f 1 | base64 -d | base58)
|
||||
self_name=$(sbotc query.read '{"query":[{"$filter":{"value":{"author": "'"$self"'", "content":{"type":"about", "about": "'"$self"'"}}}}]}' | jq -r .value?.content?.name | grep -v null | tail -n 1)
|
||||
|
||||
messages=$(sbotc messagesByType '{"type":"contact"}')
|
||||
messages=$(sbotc query.read '{"query":[{"$filter":{"value":{"content":{"type":"contact", "contact":"'"$self"'", "autofollow":true}}}}]}')
|
||||
while read -r msg
|
||||
do
|
||||
|
||||
autofollow=$(printf %s "$msg" | jq .value.content.autofollow)
|
||||
[[ ! $autofollow ]] && echo "I am NOT the PUB" && continue
|
||||
|
||||
timestamp=$(printf %s "$msg" | jq .value.timestamp)
|
||||
|
||||
echo "
|
||||
___ _______ _ _ ___ ____
|
||||
| |\ |\ /| ||_ / / \|\ || /\ / |
|
||||
_|_| \| \/_|_ ||_ \_\_/| \||/--\\_ | RECEIVED
|
||||
echo '
|
||||
_ _ ___ ____
|
||||
/ / \|\ || /\ / |
|
||||
\_\_/| \||/--\\_ | RECEIVED'
|
||||
echo $timestamp
|
||||
|
||||
$timestamp
|
||||
"
|
||||
|
||||
author=$(printf %s "$msg" | jq -r .value.author)
|
||||
[[ "$author" == "$self" ]] && echo "Message from myself" && continue
|
||||
g1author=$(printf %s "$msg" | jq -r .value.author | cut -d '@' -f 2 | cut -d '.' -f 1 | base64 -d | base58)
|
||||
|
|
Loading…
Reference in New Issue