|
|
@ -16,6 +16,8 @@ package msggateway
|
|
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
"context"
|
|
|
|
|
|
|
|
"sync/atomic"
|
|
|
|
|
|
|
|
|
|
|
|
"github.com/openimsdk/open-im-server/v3/pkg/authverify"
|
|
|
|
"github.com/openimsdk/open-im-server/v3/pkg/authverify"
|
|
|
|
"github.com/openimsdk/open-im-server/v3/pkg/common/servererrs"
|
|
|
|
"github.com/openimsdk/open-im-server/v3/pkg/common/servererrs"
|
|
|
|
"github.com/openimsdk/open-im-server/v3/pkg/common/startrpc"
|
|
|
|
"github.com/openimsdk/open-im-server/v3/pkg/common/startrpc"
|
|
|
@ -30,7 +32,6 @@ import (
|
|
|
|
"github.com/openimsdk/tools/mq/memamq"
|
|
|
|
"github.com/openimsdk/tools/mq/memamq"
|
|
|
|
"github.com/openimsdk/tools/utils/datautil"
|
|
|
|
"github.com/openimsdk/tools/utils/datautil"
|
|
|
|
"google.golang.org/grpc"
|
|
|
|
"google.golang.org/grpc"
|
|
|
|
"sync/atomic"
|
|
|
|
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
func (s *Server) InitServer(ctx context.Context, config *Config, disCov discovery.SvcDiscoveryRegistry, server *grpc.Server) error {
|
|
|
|
func (s *Server) InitServer(ctx context.Context, config *Config, disCov discovery.SvcDiscoveryRegistry, server *grpc.Server) error {
|
|
|
@ -112,14 +113,13 @@ func (s *Server) GetUsersOnlineStatus(
|
|
|
|
|
|
|
|
|
|
|
|
ps := new(msggateway.GetUsersOnlineStatusResp_SuccessDetail)
|
|
|
|
ps := new(msggateway.GetUsersOnlineStatusResp_SuccessDetail)
|
|
|
|
ps.PlatformID = int32(client.PlatformID)
|
|
|
|
ps.PlatformID = int32(client.PlatformID)
|
|
|
|
ps.Status = constant.OnlineStatus
|
|
|
|
|
|
|
|
ps.ConnID = client.ctx.GetConnID()
|
|
|
|
ps.ConnID = client.ctx.GetConnID()
|
|
|
|
ps.Token = client.token
|
|
|
|
ps.Token = client.token
|
|
|
|
ps.IsBackground = client.IsBackground
|
|
|
|
ps.IsBackground = client.IsBackground
|
|
|
|
uresp.Status = constant.OnlineStatus
|
|
|
|
uresp.Status = constant.Online
|
|
|
|
uresp.DetailPlatformStatus = append(uresp.DetailPlatformStatus, ps)
|
|
|
|
uresp.DetailPlatformStatus = append(uresp.DetailPlatformStatus, ps)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if uresp.Status == constant.OnlineStatus {
|
|
|
|
if uresp.Status == constant.Online {
|
|
|
|
resp.SuccessResult = append(resp.SuccessResult, uresp)
|
|
|
|
resp.SuccessResult = append(resp.SuccessResult, uresp)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|