Merge branch 'errcode' of github.com:OpenIMSDK/Open-IM-Server into errcode

This commit is contained in:
wangchuxiao 2023-03-16 16:10:29 +08:00
commit 62920d3dd0
2 changed files with 13 additions and 1 deletions

View File

@ -31,5 +31,16 @@ func (c *ConversationChecker) getConn() (*grpc.ClientConn, error) {
}
func (c *ConversationChecker) GetSingleConversationRecvMsgOpt(ctx context.Context, userID, conversationID string) (int32, error) {
panic("implement me")
cc, err := c.getConn()
if err != nil {
return 0, err
}
var req conversation.GetConversationReq
req.OwnerUserID = userID
req.ConversationID = conversationID
sConversation, err := conversation.NewConversationClient(cc).GetConversation(ctx, &req)
if err != nil {
return 0, err
}
return sConversation.GetConversation().RecvMsgOpt, err
}

View File

@ -77,6 +77,7 @@ func (l *ZapLogger) cores() (zap.Option, error) {
c := zap.NewProductionEncoderConfig()
c.EncodeTime = zapcore.ISO8601TimeEncoder
c.EncodeDuration = zapcore.SecondsDurationEncoder
c.EncodeLevel = zapcore.CapitalLevelEncoder
c.MessageKey = "msg"
c.LevelKey = "level"
c.TimeKey = "time"