Skip to content

Commit

Permalink
fix: fix update groupName invalid. (#2673)
Browse files Browse the repository at this point in the history
  • Loading branch information
mo3et authored Sep 27, 2024
1 parent b9217f7 commit 0ffdc58
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions internal/rpc/group/db_map.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0ffdc58

Please sign in to comment.