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
|
var noUpdate bool = false
|
||||||
if len(tokens) == 2 {
|
if len(tokens) == 2 {
|
||||||
userIdStr = tokens[1]
|
userIdStr = tokens[1]
|
||||||
|
noUpdate = true
|
||||||
} else {
|
} else {
|
||||||
userIdStr = strconv.Itoa(int(msg.UserId))
|
userIdStr = strconv.Itoa(int(msg.UserId))
|
||||||
noUpdate = true
|
|
||||||
}
|
}
|
||||||
var data *beatleader.PlayerDataLite
|
var data *beatleader.PlayerDataLite
|
||||||
var lastData *beatleader.PlayerDataLite
|
var lastData *beatleader.PlayerDataLite
|
||||||
|
@ -210,8 +210,9 @@ func getMySSPic(msg model.Message) (reply *model.Reply) {
|
|||||||
noUpdate = false
|
noUpdate = false
|
||||||
)
|
)
|
||||||
var userIdStr string
|
var userIdStr string
|
||||||
if len(msg.RawMsg) > len("查ss ") {
|
tokens := util.SplitN(msg.RawMsg, 2)
|
||||||
userIdStr = strings.Split(msg.RawMsg, " ")[1]
|
if len(tokens) == 2 {
|
||||||
|
userIdStr = tokens[1]
|
||||||
noUpdate = true
|
noUpdate = true
|
||||||
} else {
|
} else {
|
||||||
userIdStr = strconv.Itoa(int(msg.UserId))
|
userIdStr = strconv.Itoa(int(msg.UserId))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user