fix(protocol): accept Unicode system face identifiers (#324)

This commit is contained in:
DrSmoothl committed 2026-08-08 17:42:14 +08:00
1 parent 65683bb44d
commit 39d5a50d5f
6 files changed
+122 -26

No files matched your search

@@ -31,6 +31,32 @@ describe('system face actions', () => {
});
});
it('preserves Unicode catalog identifiers in the public catalog response', async () => {
const unicodeFace = {
...FACE,
qSid: '😊',
qDes: '/嘿嘿',
qCid: 128522,
emCode: '400832',
aniStickerType: null,
aniStickerPackId: null,
aniStickerId: null,
};
const fetchCatalog = vi.fn(async () => [{ packName: 'emoji', emojis: [unicodeFace] }]);
const response = await handler({ fetchCatalog }).handle('fetch_sys_faces', {});
expect(response).toMatchObject({
status: 'ok',
data: {
packs: [{
pack_name: 'emoji',
emojis: [{ q_sid: '😊', q_des: '/嘿嘿', q_cid: 128522, em_code: '400832' }],
}],
},
});
});
it('looks up one id without redownloading a fresh catalog', async () => {
const fetchFace = vi.fn(async () => FACE);
const response = await handler({ fetchFace }).handle('fetch_face_entity', { face_id: '392' });