fix: 临时修复danmaku_msg多内容导致的解析失败问题。

main
NorthLan 3 years ago
parent 657f3c800d
commit 169ab93840

@ -10,6 +10,7 @@ import (
"live-gateway/live"
"live-gateway/ws"
"net/http"
"strings"
"time"
)
@ -145,6 +146,10 @@ func (l *LiveBilibili) HandlerMessage(v interface{}) {
logger.SLog.Error("读取消息CMD错误")
return
}
// 暂时忽略CMD错误
if strings.Contains(cmd.CMD, "DANMU_MSG") {
cmd.CMD = "DANMU_MSG"
}
handler, ok := l.msgHandlerMapper[cmd.CMD]
if !ok {
logger.SLog.Debugf("未发现 %s 处理器", cmd.CMD)

@ -7,7 +7,7 @@ Bilibili:
RoomId: 8722013
Log:
Console:
Level: info
Level: debug
Format: console
File:
Enabled: true

Loading…
Cancel
Save