Skip to content

Commit

Permalink
Update to latest protos
Browse files Browse the repository at this point in the history
  • Loading branch information
neekolas committed Oct 26, 2023
1 parent e7a4f18 commit cdde011
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
4 changes: 2 additions & 2 deletions pkg/api/message/v3/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down Expand Up @@ -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")
}
}
Expand Down

0 comments on commit cdde011

Please sign in to comment.