package group import ( pbGroup "Open_IM/pkg/proto/group" open_im_sdk "Open_IM/pkg/proto/sdk_ws" "time" ) func UpdateGroupInfoMap(group *open_im_sdk.GroupInfoForSet) map[string]any { m := make(map[string]any) if group.GroupName != "" { m["group_name"] = group.GroupName } if group.Notification != "" { m["notification"] = group.Notification } if group.Introduction != "" { m["introduction"] = group.Introduction } if group.FaceURL != "" { m["face_url"] = group.FaceURL } if group.NeedVerification != nil { m["need_verification"] = group.NeedVerification.Value } if group.LookMemberInfo != nil { m["look_member_info"] = group.LookMemberInfo.Value } if group.ApplyMemberFriend != nil { m["apply_member_friend"] = group.ApplyMemberFriend.Value } return m } func UpdateGroupStatusMap(status int) map[string]any { return map[string]any{ "status": status, } } func UpdateGroupMemberMutedTimeMap(t time.Time) map[string]any { return map[string]any{ "mute_end_time": t, } } func UpdateGroupMemberMap(req *pbGroup.SetGroupMemberInfoReq) map[string]any { m := make(map[string]any) if req.Nickname != nil { m["nickname"] = req.Nickname.Value } if req.FaceURL != nil { m["face_url"] = req.FaceURL.Value } if req.RoleLevel != nil { m["role_level"] = req.RoleLevel.Value } if req.Ex != nil { m["ex"] = req.Ex.Value } return m }