diff --git a/internal/push/logic/push_to_client.go b/internal/push/logic/push_to_client.go index 634d2e008..b1b7d1d0a 100644 --- a/internal/push/logic/push_to_client.go +++ b/internal/push/logic/push_to_client.go @@ -295,45 +295,3 @@ func GetOfflinePushOpts(pushMsg *pbPush.PushMsgReq) (opts push.PushOpts, err err return opts, nil } - -//func SendMsgByWS(m *pbChat.WSToMsgSvrChatMsg) { -// m.MsgID = rpcChat.GetMsgID(m.SendID) -// m.ClientMsgID = m.MsgID -// switch m.SessionType { -// case constant.SingleChatType: -// sendMsgToKafka(m, m.SendID, "msgKey--sendID") -// sendMsgToKafka(m, m.RecvID, "msgKey--recvID") -// case constant.GroupChatType: -// etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) -// client := pbGroup.NewGroupClient(etcdConn) -// req := &pbGroup.Req{ -// GroupID: m.RecvID, -// Token: config.Config.Secret, -// OperationID: m.OperationID, -// } -// reply, err := client.(context.Background(), req) -// if err != nil { -// log.Error(m.Token, m.OperationID, "rpc getGroupInfo failed, err = %s", err.Error()) -// return -// } -// if reply.ErrorCode != 0 { -// log.Error(m.Token, m.OperationID, "rpc getGroupInfo failed, err = %s", reply.ErrorMsg) -// return -// } -// groupID := m.RecvID -// for i, v := range reply.MemberList { -// m.RecvID = v.UserId + " " + groupID -// sendMsgToKafka(m, utils.IntToString(i), "msgKey--recvID+\" \"+groupID") -// } -// default: -// -// } -//} -// -//func sendMsgToKafka(m *pbChat.WSToMsgSvrChatMsg, key string, flag string) { -// pid, offset, err := producer.SendMessage(m, key) -// if err != nil { -// log.ErrorByKv("kafka send failed", m.OperationID, "send data", m.String(), "pid", pid, "offset", offset, "err", err.Error(), flag, key) -// } -// -//}