fix: 更新 getMyBLPic 和 getMySSPic 函数中的用户ID解析逻辑,确保在处理消息时正确设置 noUpdate 标志

This commit is contained in:
lixiangwuxian 2025-07-19 14:15:18 +08:00
parent 2607063bd5
commit 6a022a9942
2 changed files with 4 additions and 3 deletions

View File

@ -185,9 +185,9 @@ func getMyBLPic(msg model.Message) (reply *model.Reply) {
var noUpdate bool = false
if len(tokens) == 2 {
userIdStr = tokens[1]
noUpdate = true
} else {
userIdStr = strconv.Itoa(int(msg.UserId))
noUpdate = true
}
var data *beatleader.PlayerDataLite
var lastData *beatleader.PlayerDataLite

View File

@ -210,8 +210,9 @@ func getMySSPic(msg model.Message) (reply *model.Reply) {
noUpdate = false
)
var userIdStr string
if len(msg.RawMsg) > len("查ss ") {
userIdStr = strings.Split(msg.RawMsg, " ")[1]
tokens := util.SplitN(msg.RawMsg, 2)
if len(tokens) == 2 {
userIdStr = tokens[1]
noUpdate = true
} else {
userIdStr = strconv.Itoa(int(msg.UserId))