Skip to content

Commit

Permalink
Merge ad8a25a into 514ac09
Browse files Browse the repository at this point in the history
  • Loading branch information
Hoshinonyaruko authored Aug 1, 2024
2 parents 514ac09 + ad8a25a commit a72e3f0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion handlers/send_group_msg.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func HandleSendGroupMsg(client callapi.Client, api openapi.OpenAPI, apiv2 openap
idInt64, err = idmap.GenerateRowID(message.Params.GroupID.(string), 9)
// 临时的
msgType = "group"
} else if len(message.Params.UserID.(string)) == 32 {
} else if message.Params.UserID != nil && len(message.Params.UserID.(string)) == 32 {
idInt64, err = idmap.GenerateRowID(message.Params.UserID.(string), 9)
// 临时的
msgType = "group_private"
Expand Down
2 changes: 1 addition & 1 deletion handlers/send_group_msg_raw.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func HandleSendGroupMsgRaw(client callapi.Client, api openapi.OpenAPI, apiv2 ope
idInt64, err = idmap.GenerateRowID(message.Params.GroupID.(string), 9)
// 临时的
msgType = "group"
} else if len(message.Params.UserID.(string)) == 32 {
} else if message.Params.UserID != nil && len(message.Params.UserID.(string)) == 32 {
idInt64, err = idmap.GenerateRowID(message.Params.UserID.(string), 9)
// 临时的
msgType = "group_private"
Expand Down
2 changes: 1 addition & 1 deletion handlers/send_private_msg.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func HandleSendPrivateMsg(client callapi.Client, api openapi.OpenAPI, apiv2 open
var idInt64 int64
var err error

if len(message.Params.UserID.(string)) == 32 {
if message.Params.UserID != nil && len(message.Params.UserID.(string)) == 32 {
idInt64, err = idmap.GenerateRowID(message.Params.UserID.(string), 9)
// 临时的
msgType = "group_private"
Expand Down

0 comments on commit a72e3f0

Please sign in to comment.