refactor(protocol): keep custom-face list encoding with delete

Profile still turns ids into image URLs and slices the count. Asking
for ids no longer round-trips through those URLs.
This commit is contained in:
DrSmoothl committed 2026-08-29 23:58:56 +08:00
1 parent 9cdbcb0299
commit 117335166f
7 files changed
+280 -37

No files matched your search

+2 -7
View File
@@ -1266,15 +1266,10 @@ export const actions = [
return_type: f.string().default('url'),
},
run: async (p, ctx) => {
const urls = await ctx.bridge.apis.profile.fetchCustomFace(p.count);
if (p.return_type === 'id') {
const emojiIds = urls.map((url) => {
const m = /\/qq_expression\/[^/]+\/([^/]+)\//.exec(url);
return m ? m[1] : '';
}).filter(Boolean);
return okResponse(emojiIds);
return okResponse(await ctx.bridge.apis.profile.fetchCustomFaceIds(p.count));
}
return okResponse(urls);
return okResponse(await ctx.bridge.apis.profile.fetchCustomFace(p.count));
},
}),