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

+1 -2
View File
@@ -295,8 +295,7 @@ function validateCatalog(packs: SysFacePackEntry[]): SysFacePackEntry[] {
throw new Error(`invalid system face pack at index ${packIndex}`);
}
for (const [faceIndex, face] of pack.emojis.entries()) {
if (!face || typeof face.qSid !== 'string' || !/^(?:0|[1-9]\d*)$/.test(face.qSid)
|| !Number.isSafeInteger(Number(face.qSid)) || Number(face.qSid) < 0) {
if (!face || typeof face.qSid !== 'string' || face.qSid.length === 0) {
throw new Error(
`invalid system face id at pack ${packIndex}, face ${faceIndex}: `
+ `value=${JSON.stringify(face?.qSid)}`,