fix: fix update groupName invalid. (#2673)

pull/2675/head
Monet Lee 2 days ago committed by GitHub
parent b9217f76ce
commit 0ffdc58e48
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -58,8 +58,12 @@ func UpdateGroupInfoMap(ctx context.Context, group *sdkws.GroupInfoForSet) map[s
func UpdateGroupInfoExMap(ctx context.Context, group *pbgroup.SetGroupInfoExReq) (map[string]any, error) {
m := make(map[string]any)
if group.GroupName != nil && group.GroupName.Value != "" {
return nil, errs.ErrArgs.WrapMsg("group name is empty")
if group.GroupName != nil {
if group.GroupName.Value != "" {
m["group_name"] = group.GroupName.Value
} else {
return nil, errs.ErrArgs.WrapMsg("group name is empty")
}
}
if group.Notification != nil {
m["notification"] = group.Notification.Value

Loading…
Cancel
Save