From 01bd6048c3b4bb4d46df07e8084025c465a9bdb7 Mon Sep 17 00:00:00 2001 From: syui Date: Tue, 22 Apr 2025 18:29:30 +0900 Subject: [PATCH] fix --- scpt/at.zsh | 3 +++ scpt/src/ai/syui/game/character.zsh | 1 + scpt/src/func.zsh | 31 ++++++++++++++++++++++++++++- 3 files changed, 34 insertions(+), 1 deletion(-) diff --git a/scpt/at.zsh b/scpt/at.zsh index c53fdba..f52afe8 100755 --- a/scpt/at.zsh +++ b/scpt/at.zsh @@ -61,6 +61,9 @@ case $1 in source $d/src/ai/syui/game/character.zsh delete_game_user $2 $3 ;; + verify-icon) + verify-icon + ;; *) echo "${help[@]}" echo "${host[@]}" diff --git a/scpt/src/ai/syui/game/character.zsh b/scpt/src/ai/syui/game/character.zsh index 064180e..17a386d 100755 --- a/scpt/src/ai/syui/game/character.zsh +++ b/scpt/src/ai/syui/game/character.zsh @@ -210,6 +210,7 @@ delete_game_user() { req=com.atproto.repo.DeleteRecord url=https://$pds/xrpc/$req repo=$did + #repo=did:plc:6qyecktefllvenje24fcxnie json="{\"collection\":\"$col\", \"rkey\":\"$rkey\", \"repo\":\"$repo\"}" echo $json curl -sL -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $token" -d $json $url diff --git a/scpt/src/func.zsh b/scpt/src/func.zsh index 4d261ac..f66db20 100644 --- a/scpt/src/func.zsh +++ b/scpt/src/func.zsh @@ -8,7 +8,7 @@ function at-env() { did_syui=did:plc:uqzpqmrjnptsxezjx4xuh2mn handle=$handle_yui did=$did_yui - created=2020-01-01T00:00:00+09:00 + created=2025-04-21T00:00:00.323Z at_uri=at://$did_yui/ai.syui.game.user/syui docs_uri=https://docs.bsky.app/docs/api did=`echo $at_uri|cut -d / -f 3` @@ -173,3 +173,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 +}