|
|
@@ -3608,6 +3608,11 @@ const sendMessage = (obj: any) => {
|
|
|
// 特殊类型消息:存储到对应的独立数组
|
|
|
const targetArray = getMessageArrayByType(messageType)
|
|
|
if (targetArray) {
|
|
|
+ // 限制特殊消息数组最多 200 条,超出时删除最早的
|
|
|
+ const MAX_SPECIAL = 200
|
|
|
+ if (targetArray.length >= MAX_SPECIAL) {
|
|
|
+ targetArray.delete(0, targetArray.length - MAX_SPECIAL + 1)
|
|
|
+ }
|
|
|
targetArray.push([message])
|
|
|
}
|
|
|
}
|