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:
7 files changed
+280
-37
No files matched your search
@@ -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));
|
||||
},
|
||||
}),
|
||||
|
||||
|
||||
Reference in new issue
Block a user