diff --git a/internal/api/msg/send_msg.go b/internal/api/msg/send_msg.go index 93502fe33..5b4654fce 100644 --- a/internal/api/msg/send_msg.go +++ b/internal/api/msg/send_msg.go @@ -80,7 +80,7 @@ func SendMsg(c *gin.Context) { } client := pbChat.NewMsgClient(etcdConn) - log.Info("", "", "api SendMsg call, api call rpc...") + log.Info(params.OperationID, "", "api SendMsg call, api call rpc...") reply, err := client.SendMsg(context.Background(), pbData) if err != nil { diff --git a/internal/rpc/msg/send_msg.go b/internal/rpc/msg/send_msg.go index 80938dc40..bf553714f 100644 --- a/internal/rpc/msg/send_msg.go +++ b/internal/rpc/msg/send_msg.go @@ -933,6 +933,7 @@ func Notification(n *NotificationMsg) { log.NewError(req.OperationID, "SendMsg rpc failed, ", req.String(), reply.ErrCode, reply.ErrMsg) } } + func getOnlineAndOfflineUserIDList(memberList []string, m map[string][]string, operationID string) { var onllUserIDList, offlUserIDList []string var wsResult []*pbRelay.GetUsersOnlineStatusResp_SuccessResult diff --git a/pkg/proto/auth/auth.proto b/pkg/proto/auth/auth.proto index 0b4595cba..ee970268d 100644 --- a/pkg/proto/auth/auth.proto +++ b/pkg/proto/auth/auth.proto @@ -42,6 +42,18 @@ message ForceLogoutResp { CommonResp CommonResp = 1; } +message ParseTokenReq{ + string token = 1; + string operationID = 2; +} + + +message ParseTokenResp{ + string userID = 1; + string operationID = 2; + CommonResp commonResp = 3; + uint32 expireTimeSeconds = 4; +} @@ -50,4 +62,7 @@ service Auth { rpc UserRegister(UserRegisterReq) returns(UserRegisterResp); rpc UserToken(UserTokenReq) returns(UserTokenResp); rpc ForceLogout(ForceLogoutReq) returns(ForceLogoutResp); + rpc ParseToken(ParseTokenReq)returns(ParseTokenResp); } + + diff --git a/pkg/proto/msg/msg.proto b/pkg/proto/msg/msg.proto index e52422dd8..c2118c756 100644 --- a/pkg/proto/msg/msg.proto +++ b/pkg/proto/msg/msg.proto @@ -131,6 +131,9 @@ message DelSuperGroupMsgResp{ int32 errCode = 1; string errMsg = 2; } + + + service msg { rpc GetMaxAndMinSeq(server_api_params.GetMaxAndMinSeqReq) returns(server_api_params.GetMaxAndMinSeqResp); rpc PullMessageBySeqList(server_api_params.PullMessageBySeqListReq) returns(server_api_params.PullMessageBySeqListResp); @@ -141,4 +144,5 @@ service msg { rpc SetMsgMinSeq(SetMsgMinSeqReq) returns(SetMsgMinSeqResp); rpc SetSendMsgStatus(SetSendMsgStatusReq) returns(SetSendMsgStatusResp); rpc GetSendMsgStatus(GetSendMsgStatusReq) returns(GetSendMsgStatusResp); + }