diff --git a/go.mod b/go.mod index 8c4ec9937..603a67cd6 100644 --- a/go.mod +++ b/go.mod @@ -21,7 +21,7 @@ require ( require golang.org/x/net v0.11.0 require ( - github.com/OpenIMSDK/protocol v0.0.10 + github.com/OpenIMSDK/protocol v0.0.12 github.com/OpenIMSDK/tools v0.0.5 github.com/google/go-cmp v0.5.9 golang.org/x/image v0.9.0 diff --git a/go.sum b/go.sum index 4e3284de1..4de889d79 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,5 @@ -github.com/OpenIMSDK/protocol v0.0.10 h1:OiJR2BAAJjuKKK8KPxYZdJCwOSzMMxwF5fnJdOmLPdQ= -github.com/OpenIMSDK/protocol v0.0.10/go.mod h1:F25dFrwrIx3lkNoiuf6FkCfxuwf8L4Z8UIsdTHP/r0Y= +github.com/OpenIMSDK/protocol v0.0.12 h1:79rBgpKBF4TMy5tkLH3DQNiZFVmxKMP7VyX+kmJh4d8= +github.com/OpenIMSDK/protocol v0.0.12/go.mod h1:F25dFrwrIx3lkNoiuf6FkCfxuwf8L4Z8UIsdTHP/r0Y= github.com/OpenIMSDK/tools v0.0.5 h1:yBVHJ3EpIDcp8VFKPjuGr6MQvFa3t4JByZ+vmeC06/Q= github.com/OpenIMSDK/tools v0.0.5/go.mod h1:eg+q4A34Qmu73xkY0mt37FHGMCMfC6CtmOnm0kFEGFI= github.com/antonfisher/nested-logrus-formatter v1.3.1 h1:NFJIr+pzwv5QLHTPyKz9UMEoHck02Q9L0FP13b/xSbQ= diff --git a/internal/user/sync.go b/internal/user/sync.go index ba3481fbc..02f7fda24 100644 --- a/internal/user/sync.go +++ b/internal/user/sync.go @@ -44,9 +44,9 @@ func (u *User) SyncLoginUserInfo(ctx context.Context) error { func (u *User) SyncUserStatus(ctx context.Context, fromId string, toUserID string, status int32, platformID int32, c func(userID string, statusMap *userPb.OnlineStatus)) { statusMap := userPb.OnlineStatus{ - UserID: fromId, - Status: status, - PlatformID: platformID, + UserID: fromId, + Status: status, + PlatformIDs: []int32{platformID}, } c(fromId, &statusMap) u.listener.OnUserStatusChanged(utils.StructToJsonString(statusMap))