fix: update setGroupInfoEx func name and field. (#2634)

* refactor: refactor workflows contents.

* add tool workflows.

* update field.

* fix: remove chat error.

* Fix err.

* fix error.

* remove cn comment.

* update workflows files.

* update infra config.

* move workflows.

* feat: update bot.

* fix: solve uncorrect outdated msg get.

* update get docIDs logic.

* update

* update skip logic.

* fix

* update.

* fix: delay deleteObject func.

* remove unused content.

* update log type.

* feat: implement request batch count limit.

* update

* update

* fix: update setGroupInfoEx func name and field.

* refactor: update groupinfoEx field.

* refactor: update database name in mongodb.yml

* add groupName Condition
This commit is contained in:
Monet Lee
2024-09-19 15:18:37 +08:00
committed by GitHub
parent 56acee107e
commit b64edb67c7
11 changed files with 85 additions and 80 deletions
+5 -4
View File
@@ -20,6 +20,7 @@ import (
pbgroup "github.com/openimsdk/protocol/group"
"github.com/openimsdk/protocol/sdkws"
"github.com/openimsdk/tools/errs"
"github.com/openimsdk/tools/mcontext"
)
@@ -54,11 +55,11 @@ func UpdateGroupInfoMap(ctx context.Context, group *sdkws.GroupInfoForSet) map[s
return m
}
func UpdateGroupInfoEXMap(ctx context.Context, group *sdkws.GroupInfoForSetEX) map[string]any {
func UpdateGroupInfoExMap(ctx context.Context, group *pbgroup.SetGroupInfoExReq) (map[string]any, error) {
m := make(map[string]any)
if group.GroupName != "" {
m["group_name"] = group.GroupName
if group.GroupName != nil && group.GroupName.Value != "" {
return nil, errs.ErrArgs.WrapMsg("group name is empty")
}
if group.Notification != nil {
m["notification"] = group.Notification.Value
@@ -84,7 +85,7 @@ func UpdateGroupInfoEXMap(ctx context.Context, group *sdkws.GroupInfoForSetEX) m
m["ex"] = group.Ex.Value
}
return m
return m, nil
}
func UpdateGroupStatusMap(status int) map[string]any {