mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-05 17:45:59 +08:00
rtc add
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
package apiChat
|
||||
|
||||
//
|
||||
//import (
|
||||
// apiStruct "Open_IM/pkg/base_info"
|
||||
// "Open_IM/pkg/common/config"
|
||||
// "Open_IM/pkg/common/log"
|
||||
// "Open_IM/pkg/common/token_verify"
|
||||
// "Open_IM/pkg/grpc-etcdv3/getcdv3"
|
||||
// pbChat "Open_IM/pkg/proto/chat"
|
||||
// "Open_IM/pkg/utils"
|
||||
// "github.com/gin-gonic/gin"
|
||||
// "net/http"
|
||||
// "strings"
|
||||
//)
|
||||
//
|
||||
//func DelMsg(c *gin.Context) {
|
||||
// var (
|
||||
// req apiStruct.DelMsgReq
|
||||
// resp apiStruct.DelMsgResp
|
||||
// reqPb pbChat.
|
||||
// )
|
||||
// ok, userID := token_verify.GetUserIDFromToken(c.Request.Header.Get("token"))
|
||||
// if !ok {
|
||||
// log.NewError(req.OperationID, "GetUserIDFromToken false ", c.Request.Header.Get("token"))
|
||||
// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"})
|
||||
// return
|
||||
// }
|
||||
// grpcConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfflineMessageName)
|
||||
// msgClient := pbChat.NewChatClient(grpcConn)
|
||||
// //respPb, err := msgClient.DelMsgList()
|
||||
//}
|
||||
@@ -7,6 +7,7 @@ import (
|
||||
"Open_IM/pkg/grpc-etcdv3/getcdv3"
|
||||
"Open_IM/pkg/proto/chat"
|
||||
open_im_sdk "Open_IM/pkg/proto/sdk_ws"
|
||||
"Open_IM/pkg/utils"
|
||||
"context"
|
||||
"github.com/gin-gonic/gin"
|
||||
"net/http"
|
||||
@@ -39,7 +40,10 @@ func PullMsgBySeqList(c *gin.Context) {
|
||||
|
||||
token := c.Request.Header.Get("token")
|
||||
if ok, err := token_verify.VerifyToken(token, params.SendID); !ok {
|
||||
c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "token validate err" + err.Error()})
|
||||
if err != nil {
|
||||
log.NewError(params.OperationID, utils.GetSelfFuncName(), err.Error(), token, params.SendID)
|
||||
}
|
||||
c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "token validate err"})
|
||||
return
|
||||
}
|
||||
pbData := open_im_sdk.PullMessageBySeqListReq{}
|
||||
|
||||
Reference in New Issue
Block a user