mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
conversation update
This commit is contained in:
parent
687933a63e
commit
ebd867a6d5
@ -42,7 +42,8 @@ func UserGetSeq(c *gin.Context) {
|
||||
msgClient := pbMsg.NewChatClient(grpcConn)
|
||||
reply, err := msgClient.GetMaxAndMinSeq(context.Background(), &pbData)
|
||||
if err != nil {
|
||||
log.ErrorByKv("rpc call failed to getNewSeq", pbData.OperationID, "err", err, "pbData", pbData.String())
|
||||
log.NewError(params.OperationID, "UserGetSeq rpc failed, ", params, err.Error())
|
||||
c.JSON(http.StatusBadRequest, gin.H{"errCode": 401, "errMsg": "UserGetSeq rpc failed, " + err.Error()})
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -43,7 +43,8 @@ func UserPullMsg(c *gin.Context) {
|
||||
msgClient := pbChat.NewChatClient(grpcConn)
|
||||
reply, err := msgClient.PullMessage(context.Background(), &pbData)
|
||||
if err != nil {
|
||||
log.ErrorByKv("PullMessage error", pbData.OperationID, "err", err.Error())
|
||||
log.NewError(params.OperationID, "UserPullMsg rpc failed, ", params, err.Error())
|
||||
c.JSON(http.StatusBadRequest, gin.H{"errCode": 401, "errMsg": "UserPullMsg rpc failed, " + err.Error()})
|
||||
return
|
||||
}
|
||||
log.InfoByKv("rpc call success to pullMsgRep", pbData.OperationID, "ReplyArgs", reply.String(), "maxSeq", reply.GetMaxSeq(),
|
||||
|
@ -77,7 +77,12 @@ func UserSendMsg(c *gin.Context) {
|
||||
|
||||
log.Info("", "", "api UserSendMsg call, api call rpc...")
|
||||
|
||||
reply, _ := client.UserSendMsg(context.Background(), pbData)
|
||||
reply, err := client.UserSendMsg(context.Background(), pbData)
|
||||
if err != nil {
|
||||
log.NewError(params.OperationID, "UserSendMsg rpc failed, ", params, err.Error())
|
||||
c.JSON(http.StatusBadRequest, gin.H{"errCode": 401, "errMsg": "UserSendMsg rpc failed, " + err.Error()})
|
||||
return
|
||||
}
|
||||
log.Info("", "", "api UserSendMsg call end..., [data: %s] [reply: %s]", pbData.String(), reply.String())
|
||||
|
||||
c.JSON(http.StatusOK, gin.H{
|
||||
|
@ -224,7 +224,7 @@ func modifyMessageByUserMessageReceiveOpt(userID, sourceID string, sessionType i
|
||||
case constant.NotReceiveMessage:
|
||||
return false
|
||||
case constant.ReceiveNotNotifyMessage:
|
||||
m := utils.JsonStringToMap(msg.OfflineInfo)
|
||||
m := utils.JsonStringToMap(msg.Options)
|
||||
utils.SetSwitchFromOptions(m, "offlinePush", 0)
|
||||
s := utils.MapToJsonString(m)
|
||||
msg.OfflineInfo = s
|
||||
|
Loading…
x
Reference in New Issue
Block a user