From 887267e62d99d22a01905ff765a48c7b628e00e9 Mon Sep 17 00:00:00 2001 From: pluto <83957921+plutoyty@users.noreply.github.com> Date: Fri, 14 Jul 2023 18:59:28 +0800 Subject: [PATCH 1/2] fix bug #545 (#555) --- go.mod | 4 +--- internal/push/offlinepush/offlinepush_interface.go | 3 +++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 8a7fd7153..21e6e2241 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.18 require ( firebase.google.com/go v3.13.0+incompatible github.com/OpenIMSDK/open_utils v1.0.8 - github.com/Shopify/sarama v1.32.0 + github.com/Shopify/sarama v1.29.0 github.com/bwmarrin/snowflake v0.3.0 github.com/dtm-labs/rockscache v0.1.1 github.com/gin-gonic/gin v1.9.1 @@ -141,5 +141,3 @@ require ( google.golang.org/genproto v0.0.0-20230525234025-438c736192d0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect ) - -replace github.com/Shopify/sarama => github.com/Shopify/sarama v1.29.0 diff --git a/internal/push/offlinepush/offlinepush_interface.go b/internal/push/offlinepush/offlinepush_interface.go index 44dfce2b8..5aa7e089f 100644 --- a/internal/push/offlinepush/offlinepush_interface.go +++ b/internal/push/offlinepush/offlinepush_interface.go @@ -18,10 +18,12 @@ import ( "context" ) +// OfflinePusher Offline Pusher type OfflinePusher interface { Push(ctx context.Context, userIDs []string, title, content string, opts *Opts) error } +// Opts opts type Opts struct { Signal *Signal IOSPushSound string @@ -29,6 +31,7 @@ type Opts struct { Ex string } +// Signal message id type Signal struct { ClientMsgID string } From 16a851d9515e701e457cdb5efee2be7c58a3928e Mon Sep 17 00:00:00 2001 From: Alan <68671759+hanzhixiao@users.noreply.github.com> Date: Fri, 14 Jul 2023 19:14:18 +0800 Subject: [PATCH 2/2] message for your changes (#565) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: ‘hanzhixiao’ <‘709674996@qq.com’> Co-authored-by: ‘hanzhixiao’ <‘709674996@qq.com’> --- build.cmd | 1 + internal/rpc/msg/server.go | 3 --- pkg/common/db/controller/msg.go | 6 ------ 3 files changed, 1 insertion(+), 9 deletions(-) create mode 100644 build.cmd diff --git a/build.cmd b/build.cmd new file mode 100644 index 000000000..4c53576c0 --- /dev/null +++ b/build.cmd @@ -0,0 +1 @@ +go build -o \ No newline at end of file diff --git a/internal/rpc/msg/server.go b/internal/rpc/msg/server.go index 1a152b7be..5e2cf925f 100644 --- a/internal/rpc/msg/server.go +++ b/internal/rpc/msg/server.go @@ -17,9 +17,6 @@ package msg import ( "context" - - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/relation" - "google.golang.org/grpc" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" diff --git a/pkg/common/db/controller/msg.go b/pkg/common/db/controller/msg.go index fe72396ce..fdda23ac9 100644 --- a/pkg/common/db/controller/msg.go +++ b/pkg/common/db/controller/msg.go @@ -15,16 +15,10 @@ package controller import ( - "context" "errors" "time" - "gorm.io/gorm" - - relation2 "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/relation" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation" - "github.com/redis/go-redis/v9" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config"