fix scpt
This commit is contained in:
@ -8,21 +8,25 @@ function at-env() {
|
||||
did_syui=did:plc:uqzpqmrjnptsxezjx4xuh2mn
|
||||
handle=$handle_yui
|
||||
did=$did_yui
|
||||
created=2020-01-01T00:00:00+09:00
|
||||
at_uri=at://$did_yui/ai.syui.game.user/syui
|
||||
created=2025-04-21T00:00:00.323Z
|
||||
docs_uri=https://docs.bsky.app/docs/api
|
||||
did=`echo $at_uri|cut -d / -f 3`
|
||||
collection=`echo $at_uri|cut -d / -f 4`
|
||||
rkey=`echo $at_uri|cut -d / -f 5`
|
||||
d=${0:a:h}
|
||||
f=~/.config/ai/token.json
|
||||
if [ -f $f ];then
|
||||
host=`cat $f|jq -r ".didDoc.service.[].serviceEndpoint"`
|
||||
host=`cat $f|jq -r ".didDoc.service.[].serviceEndpoint"|cut -d / -f 3`
|
||||
token=`cat $f|jq -r .accessJwt`
|
||||
did=`cat $f|jq -r .did`
|
||||
handle=`cat $f|jq -r .handle`
|
||||
actor=$did
|
||||
fi
|
||||
if [ "$host" = "syu.is" ];then
|
||||
plc=plc.syu.is
|
||||
pds=$host
|
||||
fi
|
||||
at_uri=at://$handle/ai.syui.game/ai
|
||||
did=`echo $at_uri|cut -d / -f 3`
|
||||
collection=`echo $at_uri|cut -d / -f 4`
|
||||
rkey=`echo $at_uri|cut -d / -f 5`
|
||||
}
|
||||
|
||||
function at-unset() {
|
||||
@ -173,3 +177,32 @@ function at-profile() {
|
||||
url="${host}${req}?actor=$did"
|
||||
curl -sL -X GET -H "Content-Type: application/json" -H "Authorization: Bearer $token" $url|jq .
|
||||
}
|
||||
|
||||
function verify-icon() {
|
||||
syuisadmin_handle=ai.syu.is
|
||||
syuisadmin_did=did:plc:6qyecktefllvenje24fcxnie
|
||||
#rkey=
|
||||
col=app.bsky.graph.verification
|
||||
handle=syui.syu.is
|
||||
subject=did:plc:vzsvtbtbnwn22xjqhcu3vd6y
|
||||
displayName=syui
|
||||
req=/xrpc/com.atproto.repo.createRecord
|
||||
url=${host}${req}
|
||||
json="
|
||||
{
|
||||
\"repo\": \"$syuisadmin_handle\",
|
||||
\"did\": \"$syuisadmin_did\",
|
||||
\"collection\": \"$col\",
|
||||
\"record\": {
|
||||
\"subject\": \"$subject\",
|
||||
\"handle\": \"$handle\",
|
||||
\"displayName\": \"$displayName\",
|
||||
\"createdAt\": \"${created}\"
|
||||
}
|
||||
}"
|
||||
|
||||
if echo $json|jq . ;then
|
||||
t=`curl -sL -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $token" -d $json $url`
|
||||
echo $t
|
||||
fi
|
||||
}
|
||||
|
Reference in New Issue
Block a user