Something went wrong. Try again.
A rhythm game leaderboard server that can't EOS. tsunagite.dev
Something went wrong. Try again.
12345678910111213141516171819202122function handle() local r = Record("dev.tsunagite.game", input.game) r:set_rkey(input.id) r:save() --TODO: swap once happyview has built-in handle resolution local resp = xrpc.query("com.atproto.identity.resolveIdentity", { identifier = caller_did }) local hdl = json.decode(resp.body).handle return { uri = r._uri, profileKey = makeProfileKey(hdl, input.id), cid = r._cid }end
function makeProfileKey(handle, key) local splitHandle = {} for str in string.gmatch(handle, "([^.]+)") do table.insert(splitHandle, str) end local result = "" for i=0, #splitHandle-1 do result = result .. splitHandle[#splitHandle-i] .. "." end result = result .. key return resultend