Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Beta473 #479

Merged
merged 28 commits into from
Aug 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion handlers/send_group_msg.go
Original file line number Diff line number Diff line change
@@ -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"
2 changes: 1 addition & 1 deletion handlers/send_group_msg_raw.go
Original file line number Diff line number Diff line change
@@ -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"
2 changes: 1 addition & 1 deletion handlers/send_private_msg.go
Original file line number Diff line number Diff line change
@@ -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"