From 587533df4dc29b2c4921259c03b3adee0107b0eb Mon Sep 17 00:00:00 2001 From: Brabem <69128477+luhaoling@users.noreply.github.com> Date: Wed, 3 Jan 2024 15:46:38 +0800 Subject: [PATCH] fix: update Notification update resp (#1663) * fix: fix the error * fix: fix the SearchNotificationAccount resp * fix: fix the god * Update install-im-server.sh * Update install-im-server.sh --------- Co-authored-by: Xinwei Xiong <3293172751@qq.com> --- go.mod | 4 ++-- go.sum | 4 ++-- internal/rpc/user/user.go | 2 +- scripts/install-im-server.sh | 7 +++---- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index 393e742de..f1b3239c3 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.19 require ( firebase.google.com/go v3.13.0+incompatible - github.com/OpenIMSDK/protocol v0.0.42 + github.com/OpenIMSDK/protocol v0.0.43 github.com/OpenIMSDK/tools v0.0.21 github.com/bwmarrin/snowflake v0.3.0 // indirect github.com/dtm-labs/rockscache v0.1.1 @@ -155,4 +155,4 @@ require ( go.uber.org/zap v1.24.0 // indirect golang.org/x/crypto v0.14.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect -) \ No newline at end of file +) diff --git a/go.sum b/go.sum index fc1d15242..e72d862e6 100644 --- a/go.sum +++ b/go.sum @@ -18,8 +18,8 @@ firebase.google.com/go v3.13.0+incompatible/go.mod h1:xlah6XbEyW6tbfSklcfe5FHJIw github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/IBM/sarama v1.41.3 h1:MWBEJ12vHC8coMjdEXFq/6ftO6DUZnQlFYcxtOJFa7c= github.com/IBM/sarama v1.41.3/go.mod h1:Xxho9HkHd4K/MDUo/T/sOqwtX/17D33++E9Wib6hUdQ= -github.com/OpenIMSDK/protocol v0.0.42 h1:vIWXqZJZZ1ddleJA25fxhjZ1GyEHATpYM3wVWh4/+PY= -github.com/OpenIMSDK/protocol v0.0.42/go.mod h1:F25dFrwrIx3lkNoiuf6FkCfxuwf8L4Z8UIsdTHP/r0Y= +github.com/OpenIMSDK/protocol v0.0.43 h1:8B921vEyO7r0AfQfZd7kCycYja+hJ2vuIZsKge/WRhU= +github.com/OpenIMSDK/protocol v0.0.43/go.mod h1:F25dFrwrIx3lkNoiuf6FkCfxuwf8L4Z8UIsdTHP/r0Y= github.com/OpenIMSDK/tools v0.0.21 h1:iTapc2mIEVH/xl5Nd6jfwPub11Pgp44tVcE1rjB3a48= github.com/OpenIMSDK/tools v0.0.21/go.mod h1:eg+q4A34Qmu73xkY0mt37FHGMCMfC6CtmOnm0kFEGFI= github.com/QcloudApi/qcloud_sign_golang v0.0.0-20141224014652-e4130a326409/go.mod h1:1pk82RBxDY/JZnPQrtqHlUFfCctgdorsd9M06fMynOM= diff --git a/internal/rpc/user/user.go b/internal/rpc/user/user.go index 8219ec0bc..824b8a9bb 100644 --- a/internal/rpc/user/user.go +++ b/internal/rpc/user/user.go @@ -558,7 +558,7 @@ func (s *userServer) userModelToResp(users []*relation.UserModel) *pbuser.Search accounts := make([]*pbuser.NotificationAccountInfo, 0) var total int64 for _, v := range users { - if v.AppMangerLevel == constant.AppNotificationAdmin { + if v.AppMangerLevel == constant.AppNotificationAdmin && !utils.IsContain(v.UserID, config.Config.IMAdmin.UserID) { temp := &pbuser.NotificationAccountInfo{ UserID: v.UserID, FaceURL: v.FaceURL, diff --git a/scripts/install-im-server.sh b/scripts/install-im-server.sh index e52a1a21a..a21ae134d 100755 --- a/scripts/install-im-server.sh +++ b/scripts/install-im-server.sh @@ -43,20 +43,19 @@ fi "${OPENIM_ROOT}"/scripts/init-config.sh pushd "${OPENIM_ROOT}" ${DOCKER_COMPOSE_COMMAND} stop -curl https://gitee.com/openimsdk/openim-docker/raw/main/example/full-openim-server-and-chat.yml -o docker-compose.yml +curl https://raw.githubusercontent.com/openimsdk/openim-docker/main/docker-compose.yaml -o docker-compose.yml ${DOCKER_COMPOSE_COMMAND} up -d # Wait for a short period to allow containers to initialize -sleep 10 +sleep 30 # Check the status of the containers if ! ${DOCKER_COMPOSE_COMMAND} ps | grep -q 'Up'; then echo "Error: One or more docker containers failed to start." ${DOCKER_COMPOSE_COMMAND} logs - exit 1 fi -sleep 50 # Keep the original 60-second wait, adjusted for the 10-second check above +sleep 30 # Keep the original 60-second wait, adjusted for the 10-second check above ${DOCKER_COMPOSE_COMMAND} logs openim-server ${DOCKER_COMPOSE_COMMAND} ps