Skip to content

Commit 3a496c7

Browse files
VincentZyu233Gemini
andcommitted
fix(msg): 修复图文混排时超级表情导致的截断与接收端解析中断
- 发送端:多元素图文混排时将超级表情降级为小表情形态(serviceType: 33),仅在单体唯一表情时构造 serviceType: 37 大表情 - 接收端:移除 messageParsing 遍历 elements 循环中 svcType===37 分支内错误的 break 语句,防止后续消息元素被丢弃 Co-authored-by: Gemini <gemini@google.com>
1 parent 9f374f6 commit 3a496c7

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

‎src/ntqqapi/helper/messageBuilding.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export class MessageBuilding {
6464
businessType: f.faceIndex,
6565
},
6666
})
67-
} else if (faceElement.faceType === 3) {
67+
} else if (faceElement.faceType === 3 && this.inputElems.length === 1) {
6868
const f = faceElement
6969
const pbElem = Msg.LargeFaceExtra.encode({
7070
aniStickerPackId: f.packId ? String(f.packId) : '1',
@@ -80,7 +80,7 @@ export class MessageBuilding {
8080
businessType: f.stickerType ?? 1,
8181
},
8282
})
83-
} else if (faceElement.faceType === 2) {
83+
} else if (faceElement.faceType === 2 || faceElement.faceType === 3) {
8484
const f = faceElement
8585
const pbElem = Msg.QSmallFaceExtra.encode({
8686
faceId: f.faceIndex,

‎src/ntqqapi/helper/messageParsing.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,6 @@ export function parseElements(
311311
resultId: ext.resultId,
312312
},
313313
})
314-
break
315314
} else if (svcType === 45) {
316315
const ext = Msg.MarkdownExtra.decode(pbElem)
317316
result.push({

0 commit comments

Comments
 (0)