fix: fix update groupName invalid. (#2673)

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

@ -58,9 +58,13 @@ 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 != "" {
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
m["notification_update_time"] = time.Now()

Loading…
Cancel
Save