conversation update

This commit is contained in:
Gordon 2023-03-16 15:10:23 +08:00
parent 38d3c5d94d
commit ce87ef0a04
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"