From cdde011d918b3a084c5698227fd115a3739e8523 Mon Sep 17 00:00:00 2001 From: Nicholas Molnar <65710+neekolas@users.noreply.github.com> Date: Thu, 26 Oct 2023 08:50:06 -0700 Subject: [PATCH] Update to latest protos --- go.mod | 2 +- go.sum | 2 ++ pkg/api/message/v3/service.go | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 1481fb76..e40e63bf 100644 --- a/go.mod +++ b/go.mod @@ -30,7 +30,7 @@ require ( github.com/uptrace/bun/driver/pgdriver v1.1.16 github.com/waku-org/go-waku v0.8.0 github.com/xmtp/go-msgio v0.2.1-0.20220510223757-25a701b79cd3 - github.com/xmtp/proto/v3 v3.29.1-0.20231025220423-87413e63f3ab + github.com/xmtp/proto/v3 v3.32.1-0.20231026053711-5efc208e3135 github.com/yoheimuta/protolint v0.39.0 go.uber.org/zap v1.24.0 golang.org/x/sync v0.3.0 diff --git a/go.sum b/go.sum index 9e9fac51..7ce0b101 100644 --- a/go.sum +++ b/go.sum @@ -1162,6 +1162,8 @@ github.com/xmtp/proto/v3 v3.29.1-0.20231025193535-9760f07c3401 h1:ctStMkU5570kEg github.com/xmtp/proto/v3 v3.29.1-0.20231025193535-9760f07c3401/go.mod h1:NF2zAjtNpVIhS4tFG19g4L1tJcPZHm81oeDFXltmOiY= github.com/xmtp/proto/v3 v3.29.1-0.20231025220423-87413e63f3ab h1:hWBftgxB7QWXDOOv1Wah6VZ6mwSFZX8e8rEGJQHm8zA= github.com/xmtp/proto/v3 v3.29.1-0.20231025220423-87413e63f3ab/go.mod h1:NF2zAjtNpVIhS4tFG19g4L1tJcPZHm81oeDFXltmOiY= +github.com/xmtp/proto/v3 v3.32.1-0.20231026053711-5efc208e3135 h1:MpeptLshF0T8ikwmVQI1mnlp5fXkbyUc+9FpyzFdsbo= +github.com/xmtp/proto/v3 v3.32.1-0.20231026053711-5efc208e3135/go.mod h1:NF2zAjtNpVIhS4tFG19g4L1tJcPZHm81oeDFXltmOiY= github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU= github.com/yoheimuta/go-protoparser/v4 v4.6.0 h1:uvz1e9/5Ihsm4Ku8AJeDImTpirKmIxubZdSn0QJNdnw= github.com/yoheimuta/go-protoparser/v4 v4.6.0/go.mod h1:AHNNnSWnb0UoL4QgHPiOAg2BniQceFscPI5X/BZNHl8= diff --git a/pkg/api/message/v3/service.go b/pkg/api/message/v3/service.go index 8e2e7ffc..9bd34e9d 100644 --- a/pkg/api/message/v3/service.go +++ b/pkg/api/message/v3/service.go @@ -159,7 +159,7 @@ func (s *Service) PublishWelcomes(ctx context.Context, req *proto.PublishWelcome // TODO: Wrap this in a transaction so publishing is all or nothing for _, welcome := range req.WelcomeMessages { contentTopic := topic.BuildWelcomeTopic(welcome.InstallationId) - if err = s.publishMessage(ctx, contentTopic, welcome.WelcomeMessage.GetV1().Ciphertext); err != nil { + if err = s.publishMessage(ctx, contentTopic, welcome.WelcomeMessage.GetV1().WelcomeMessageTlsSerialized); err != nil { return nil, status.Errorf(codes.Internal, "failed to publish welcome message: %s", err) } } @@ -266,7 +266,7 @@ func validatePublishWelcomesRequest(req *proto.PublishWelcomesRequest) error { } v1 := welcome.WelcomeMessage.GetV1() - if v1 == nil || len(v1.Ciphertext) == 0 { + if v1 == nil || len(v1.WelcomeMessageTlsSerialized) == 0 { return status.Errorf(codes.InvalidArgument, "invalid welcome message") } }