1
0
bot/scpt/reply.zsh

30 lines
714 B
Bash
Raw Normal View History

2024-02-08 06:29:46 +00:00
function reply() {
url="https://$host/xrpc/com.atproto.repo.createRecord"
col="app.bsky.feed.post"
json="{
\"repo\": \"$handle\",
\"did\": \"$did\",
\"collection\": \"$col\",
\"record\": {
\"text\": \"$text\",
\"createdAt\": \"$date\",
\"reply\": {
\"root\": {
\"cid\": \"$cid\",
\"uri\": \"$uri\"
},
\"parent\": {
\"cid\": \"$cid_p\",
\"uri\": \"$uri_p\"
}
}
}
}"
echo $json|jq .
url=https://$host/xrpc/com.atproto.repo.createRecord
j=`curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $token" -d "$json" $url`
}