fix(protocol): accept Unicode system face identifiers (#324)
This commit is contained in:
6 files changed
+122
-26
No files matched your search
@@ -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)}`,
|
||||
|
||||
Reference in new issue
Block a user