Merge remote-tracking branch 'origin/tuoyun' into tuoyun

pull/141/head
skiffer-git 3 years ago
commit 2e7fd5fe93

@ -11,7 +11,7 @@ mysql:
dbMysqlAddress: [ 43.128.5.63:13306 ] dbMysqlAddress: [ 43.128.5.63:13306 ]
dbMysqlUserName: root dbMysqlUserName: root
dbMysqlPassword: openIM dbMysqlPassword: openIM
dbMysqlDatabaseName: openIMtest1 dbMysqlDatabaseName: openIM
dbTableName: eMsg dbTableName: eMsg
dbMsgTableNum: 1 dbMsgTableNum: 1
dbMaxOpenConns: 20 dbMaxOpenConns: 20
@ -30,7 +30,7 @@ mongo:
dbRetainChatRecords: 7 dbRetainChatRecords: 7
redis: redis:
dbAddress: 43.128.5.63:16379 dbAddress: 127.0.0.1:16379
dbMaxIdle: 128 dbMaxIdle: 128
dbMaxActive: 0 dbMaxActive: 0
dbIdleTimeout: 120 dbIdleTimeout: 120

@ -78,9 +78,11 @@ func (rpc *rpcChat) encapsulateMsgData(msg *sdk_ws.MsgData) {
utils.SetSwitchFromOptions(msg.Options, constant.IsUnreadCount, false) utils.SetSwitchFromOptions(msg.Options, constant.IsUnreadCount, false)
utils.SetSwitchFromOptions(msg.Options, constant.IsOfflinePush, false) utils.SetSwitchFromOptions(msg.Options, constant.IsOfflinePush, false)
case constant.HasReadReceipt: case constant.HasReadReceipt:
log.Info("", "this is a test start", msg, msg.Options)
utils.SetSwitchFromOptions(msg.Options, constant.IsConversationUpdate, false) utils.SetSwitchFromOptions(msg.Options, constant.IsConversationUpdate, false)
utils.SetSwitchFromOptions(msg.Options, constant.IsUnreadCount, false) utils.SetSwitchFromOptions(msg.Options, constant.IsUnreadCount, false)
utils.SetSwitchFromOptions(msg.Options, constant.IsOfflinePush, false) utils.SetSwitchFromOptions(msg.Options, constant.IsOfflinePush, false)
log.Info("", "this is a test end", msg, msg.Options)
case constant.Typing: case constant.Typing:
utils.SetSwitchFromOptions(msg.Options, constant.IsHistory, false) utils.SetSwitchFromOptions(msg.Options, constant.IsHistory, false)
utils.SetSwitchFromOptions(msg.Options, constant.IsPersistent, false) utils.SetSwitchFromOptions(msg.Options, constant.IsPersistent, false)
@ -97,6 +99,7 @@ func (rpc *rpcChat) SendMsg(_ context.Context, pb *pbChat.SendMsgReq) (*pbChat.S
//if !utils.VerifyToken(pb.Token, pb.SendID) { //if !utils.VerifyToken(pb.Token, pb.SendID) {
// return returnMsg(&replay, pb, http.StatusUnauthorized, "token validate err,not authorized", "", 0) // return returnMsg(&replay, pb, http.StatusUnauthorized, "token validate err,not authorized", "", 0)
rpc.encapsulateMsgData(pb.MsgData) rpc.encapsulateMsgData(pb.MsgData)
log.Info("", "this is a test MsgData ", pb.MsgData)
msgToMQ := pbChat.MsgDataToMQ{Token: pb.Token, OperationID: pb.OperationID} msgToMQ := pbChat.MsgDataToMQ{Token: pb.Token, OperationID: pb.OperationID}
//options := utils.JsonStringToMap(pbData.Options) //options := utils.JsonStringToMap(pbData.Options)
isHistory := utils.GetSwitchFromOptions(pb.MsgData.Options, constant.IsHistory) isHistory := utils.GetSwitchFromOptions(pb.MsgData.Options, constant.IsHistory)

Loading…
Cancel
Save