mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-02 16:15:59 +08:00
send msg file modify
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"Open_IM/pkg/common/token_verify"
|
||||
"Open_IM/pkg/grpc-etcdv3/getcdv3"
|
||||
"Open_IM/pkg/proto/chat"
|
||||
"Open_IM/pkg/proto/sdk_ws"
|
||||
"context"
|
||||
"github.com/gin-gonic/gin"
|
||||
"net/http"
|
||||
@@ -22,7 +23,7 @@ type paramsUserPullMsg struct {
|
||||
}
|
||||
}
|
||||
|
||||
func UserPullMsg(c *gin.Context) {
|
||||
func PullMsg(c *gin.Context) {
|
||||
params := paramsUserPullMsg{}
|
||||
if err := c.BindJSON(¶ms); err != nil {
|
||||
c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()})
|
||||
@@ -34,7 +35,7 @@ func UserPullMsg(c *gin.Context) {
|
||||
c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "token validate err" + err.Error()})
|
||||
return
|
||||
}
|
||||
pbData := pbChat.PullMessageReq{}
|
||||
pbData := open_im_sdk.PullMessageReq{}
|
||||
pbData.UserID = params.SendID
|
||||
pbData.OperationID = params.OperationID
|
||||
pbData.SeqBegin = *params.Data.SeqBegin
|
||||
@@ -54,12 +55,12 @@ func UserPullMsg(c *gin.Context) {
|
||||
if v := reply.GetSingleUserMsg(); v != nil {
|
||||
msg["single"] = v
|
||||
} else {
|
||||
msg["single"] = []pbChat.GatherFormat{}
|
||||
msg["single"] = []open_im_sdk.GatherFormat{}
|
||||
}
|
||||
if v := reply.GetGroupUserMsg(); v != nil {
|
||||
msg["group"] = v
|
||||
} else {
|
||||
msg["group"] = []pbChat.GatherFormat{}
|
||||
msg["group"] = []open_im_sdk.GatherFormat{}
|
||||
}
|
||||
msg["maxSeq"] = reply.GetMaxSeq()
|
||||
msg["minSeq"] = reply.GetMinSeq()
|
||||
@@ -79,7 +80,7 @@ type paramsUserPullMsgBySeqList struct {
|
||||
SeqList []int64 `json:"seqList"`
|
||||
}
|
||||
|
||||
func UserPullMsgBySeqList(c *gin.Context) {
|
||||
func PullMsgBySeqList(c *gin.Context) {
|
||||
params := paramsUserPullMsgBySeqList{}
|
||||
if err := c.BindJSON(¶ms); err != nil {
|
||||
c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()})
|
||||
@@ -91,7 +92,7 @@ func UserPullMsgBySeqList(c *gin.Context) {
|
||||
c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "token validate err" + err.Error()})
|
||||
return
|
||||
}
|
||||
pbData := pbChat.PullMessageBySeqListReq{}
|
||||
pbData := open_im_sdk.PullMessageBySeqListReq{}
|
||||
pbData.UserID = params.SendID
|
||||
pbData.OperationID = params.OperationID
|
||||
pbData.SeqList = params.SeqList
|
||||
@@ -110,12 +111,12 @@ func UserPullMsgBySeqList(c *gin.Context) {
|
||||
if v := reply.GetSingleUserMsg(); v != nil {
|
||||
msg["single"] = v
|
||||
} else {
|
||||
msg["single"] = []pbChat.GatherFormat{}
|
||||
msg["single"] = []open_im_sdk.GatherFormat{}
|
||||
}
|
||||
if v := reply.GetGroupUserMsg(); v != nil {
|
||||
msg["group"] = v
|
||||
} else {
|
||||
msg["group"] = []pbChat.GatherFormat{}
|
||||
msg["group"] = []open_im_sdk.GatherFormat{}
|
||||
}
|
||||
msg["maxSeq"] = reply.GetMaxSeq()
|
||||
msg["minSeq"] = reply.GetMinSeq()
|
||||
|
||||
Reference in New Issue
Block a user