mirror of
https://github.com/hicccc77/WeFlow.git
synced 2026-03-24 23:06:51 +00:00
修复群公告解析错误
This commit is contained in:
@@ -1268,6 +1268,15 @@ class ChatService {
|
||||
case 8589934592049:
|
||||
return '[转账]'
|
||||
default:
|
||||
// 检查是否是 type=87 的群公告消息
|
||||
if (xmlType === '87') {
|
||||
const textAnnouncement = this.extractXmlValue(content, 'textannouncement')
|
||||
if (textAnnouncement) {
|
||||
return `[群公告] ${textAnnouncement}`
|
||||
}
|
||||
return '[群公告]'
|
||||
}
|
||||
|
||||
// 检查是否是 type=57 的引用消息
|
||||
if (xmlType === '57') {
|
||||
const title = this.extractXmlValue(content, 'title')
|
||||
@@ -1291,6 +1300,15 @@ class ChatService {
|
||||
const title = this.extractXmlValue(content, 'title')
|
||||
const type = this.extractXmlValue(content, 'type')
|
||||
|
||||
// 群公告消息(type 87)特殊处理
|
||||
if (type === '87') {
|
||||
const textAnnouncement = this.extractXmlValue(content, 'textannouncement')
|
||||
if (textAnnouncement) {
|
||||
return `[群公告] ${textAnnouncement}`
|
||||
}
|
||||
return '[群公告]'
|
||||
}
|
||||
|
||||
if (title) {
|
||||
switch (type) {
|
||||
case '5':
|
||||
@@ -1324,6 +1342,8 @@ class ChatService {
|
||||
return '[小程序]'
|
||||
case '2000':
|
||||
return '[转账]'
|
||||
case '87':
|
||||
return '[群公告]'
|
||||
default:
|
||||
return '[消息]'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user