mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +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
|
||||
}
|
||||
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) {
|
||||
err := ws.writeMsg(conn, websocket.BinaryMessage, bMsg)
|
||||
|
Loading…
x
Reference in New Issue
Block a user