test cron

This commit is contained in:
wangchuxiao 2022-11-01 19:51:10 +08:00
parent 10d299d1b3
commit be6811ddbd

View File

@ -325,7 +325,7 @@ func (d *DataBases) GetNewestMsg(ID string) (msg *MsgInfo, err error) {
}
if len(userChats) > 0 {
if len(userChats[0].Msg) > 0 {
return &userChats[0].Msg[len(userChats[0].Msg)], nil
return &userChats[0].Msg[len(userChats[0].Msg)-1], nil
}
return nil, errors.New("len(userChats[0].Msg) < 0")
}