diff --git a/zen/ssb_INIT.sh b/zen/ssb_INIT.sh index c5b91aa..4828933 100755 --- a/zen/ssb_INIT.sh +++ b/zen/ssb_INIT.sh @@ -113,8 +113,9 @@ export LANG=C.UTF-8 #attipix DUNITERNODE=$($MY_PATH/tools/duniter_getnode.sh) [[ $DUNITERNODE ]] && g1balance=$(silkaj -p $DUNITERNODE balance $g1pub 2>&1) || g1balance=$(silkaj balance $g1pub 2>&1) -# SSB PUBLISH G1 wallet silkaj balance # TODO crash bad text format -[[ $g1balance ]] && sbotc publish '{"type":"post","text":"'"$g1balance"'"}' +# SSB PUBLISH G1 wallet silkaj balance +INLINE=$(node -p "JSON.stringify(process.env.g1balance)") +[[ $INLINE ]] && sbotc publish '{"type":"post","text":'$INLINE'}' echo " _ _ @@ -131,7 +132,7 @@ $g1balance if [[ ! $(file "/tmp/avatar.png" | grep 'PNG') ]]; then sbotc publish '{"type":"post","text":"[My G1 Wallet QRCode]('"$id"')\nI am using [Cesium](https://cesium.app) to manage my wallet with (base64 to base58) secret.dunikey","mentions":[{"link":"'"$id"'","name":"'"$name"'","size":'"$size"',"type":"'"$type"'"}]}' else - sbotc publish '{"type":"post","text":"[Cesium Avatar]('"$id"')\n from my Wallet [Cesium](https://demo.cesium.app/#/app/wot/'"$g1pub"')","mentions":[{"link":"'"$id"'","name":"'"$name"'","size":'"$size"',"type":"'"$type"'"}]}' + sbotc publish '{"type":"post","text":"![Cesium Avatar]('"$id"')\n from my Wallet [Cesium](https://demo.cesium.app/#/app/wot/'"$g1pub"') '"$g1pub"'","mentions":[{"link":"'"$id"'","name":"'"$name"'","size":'"$size"',"type":"'"$type"'"}]}' fi echo " diff --git a/zen/zen_MAKE.sh b/zen/zen_MAKE.sh index 3a7f1e2..d941639 100755 --- a/zen/zen_MAKE.sh +++ b/zen/zen_MAKE.sh @@ -442,7 +442,7 @@ echo "$MESSAGE" INLINE=$(node -p "JSON.stringify(process.env.MESSAGE)") # echo '{"type":"post", "branch": "'"$msg_branch"'", "root": "'"$msg_root"'", "text":"'"${INLINE}"'","mentions":[{"link":"'"$id"'","name":"'"$name"'","size":"'"$size"'","type":"'"$type"'"},{"link":"#zenbot"},{"link":"#astroport"}]}' -sbotc publish '{"type":"post", "branch": "'"$msg_branch"'", "root": "'"$msg_root"'", "text":"'${INLINE}'","mentions":[{"link":"'"$id"'","name":"'"$name"'","size":"'"$size"'","type":"'"$type"'"},{"link":"#zenbot"},{"link":"#astroport"}]}' +sbotc publish '{"type":"post", "branch": "'"$msg_branch"'", "root": "'"$msg_root"'", "text":'${INLINE}',"mentions":[{"link":"'"$id"'","name":"'"$name"'","size":"'"$size"'","type":"'"$type"'"},{"link":"#zenbot"},{"link":"#astroport"}]}' else