mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-25 11:06:43 +08:00
kick
This commit is contained in:
parent
eac137a9a9
commit
f8962beca6
@ -189,7 +189,14 @@ func (r *RPCServer) OnlineBatchPushOneMsg(_ context.Context, req *pbRelay.Online
|
|||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
func (r *RPCServer) KickUserOffline(_ context.Context, req *pbRelay.KickUserOfflineReq) (*pbRelay.KickUserOfflineResp, error) {
|
func (r *RPCServer) KickUserOffline(_ context.Context, req *pbRelay.KickUserOfflineReq) (*pbRelay.KickUserOfflineResp, error) {
|
||||||
panic("implement me")
|
for _, v := range req.KickUserIDList {
|
||||||
|
oldConnMap := ws.getUserAllCons(v)
|
||||||
|
if conn, ok := oldConnMap[int(req.PlatformID)]; ok { // user->map[platform->conn]
|
||||||
|
ws.sendKickMsg(conn, &UserConn{})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil, nil
|
||||||
|
|
||||||
}
|
}
|
||||||
func sendMsgToUser(conn *UserConn, bMsg []byte, in *pbRelay.OnlinePushMsgReq, RecvPlatForm int, RecvID string) (ResultCode int64) {
|
func sendMsgToUser(conn *UserConn, bMsg []byte, in *pbRelay.OnlinePushMsgReq, RecvPlatForm int, RecvID string) (ResultCode int64) {
|
||||||
err := ws.writeMsg(conn, websocket.BinaryMessage, bMsg)
|
err := ws.writeMsg(conn, websocket.BinaryMessage, bMsg)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user