fix: 更新 getMyBLPic 和 getMySSPic 函数中的用户ID解析逻辑,确保在处理消息时正确设置 noUpdate 标志
This commit is contained in:
parent
2607063bd5
commit
6a022a9942
@ -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
|
||||
|
@ -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))
|
||||
|
Loading…
x
Reference in New Issue
Block a user