forked from axiom-team/ssb-g1-tip
Temporarilly cancel publishing on user SSB profile
This commit is contained in:
parent
c4dcea8cf6
commit
2425e01801
|
@ -177,12 +177,23 @@ EVERY=1
|
|||
TIMEBEFORE=$(date --date="-$EVERY minutes" +"%s")
|
||||
TIMESTAMP=$(date +"%s")
|
||||
#log "GETTING last $EVERY mn TX : https://duniter-g1.p2p.legal/tx/history/$g1pub/times/$TIMEBEFORE/$TIMESTAMP"
|
||||
curl -s https://$duniter_server/tx/history/$g1pub/times/$TIMEBEFORE/$TIMESTAMP | jq '.history.pending' | jq '.[].comment' > /tmp/zenfontain.g1tx.txt
|
||||
json=$(curl -s https://$duniter_server/tx/history/$g1pub/times/$TIMEBEFORE/$TIMESTAMP)
|
||||
pending_tx=$(printf %s "$json" | jq '.history.pending')
|
||||
pending_tx_comments==$(printf %s "$pending_tx" | jq '.[].comment')
|
||||
printf %s "$pending_tx_comments" > /tmp/zenfontain.g1tx.txt
|
||||
|
||||
|
||||
while read txincmd
|
||||
do
|
||||
export $txincmd
|
||||
log "$g1pub TX IN PENDING !! COMMENT = " $txincmd
|
||||
sbotc publish '{"type":"post","text":"I am receiving G1 on my SSB Wallet $g1pub"}'
|
||||
|
||||
# We have to check if [].issuers.0 != $g1pub
|
||||
# or else it will publish the following message each time we SEND a transaction
|
||||
|
||||
#sbotc publish '{"type":"post","text":"I am receiving G1 on my SSB Wallet $g1pub"}'
|
||||
|
||||
|
||||
|
||||
|
||||
done < /tmp/zenfontain.g1tx.txt
|
||||
|
|
Loading…
Reference in New Issue