fix(protocol): avoid duplicate text for animated faces

Recognize animated face compatibility labels consistently while preserving user-authored text.

Fixes #484
This commit is contained in:
DrSmoothl committed 2026-09-26 15:59:07 +08:00
1 parent 1934e4e7f7
commit 953b18b5cb
2 files changed
+21 -1

No files matched your search

@@ -395,7 +395,7 @@ function bytesEqual(left: Uint8Array, right: Uint8Array): boolean {
function isBigFaceCompatibilityText(extra: QFaceExtra, text: TextElem): boolean {
const faceText = extra.text ?? '';
const reserveData = text.pbReserve;
if (!faceText.startsWith('/') || faceText.length === 1 || text.str !== faceText || !reserveData?.length) {
if (!faceText || text.str !== faceText || !reserveData?.length) {
return false;
}