Skip to content

Commit

Permalink
Add HpkePublicKey to stream
Browse files Browse the repository at this point in the history
  • Loading branch information
neekolas committed Jan 26, 2024
1 parent 3ab997a commit 54c695c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/mls/api/v1/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@ func (s *Service) SendWelcomeMessages(ctx context.Context, req *mlsv1.SendWelcom
CreatedNs: uint64(msg.CreatedAt.UnixNano()),
InstallationKey: msg.InstallationKey,
Data: msg.Data,
HpkePublicKey: msg.HpkePublicKey,
},
},
})
Expand Down
2 changes: 2 additions & 0 deletions pkg/mls/api/v1/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,7 @@ func TestSubscribeWelcomeMessages(t *testing.T) {
CreatedNs: uint64(i + 1),
InstallationKey: installationKey,
Data: []byte(fmt.Sprintf("data%d", i+1)),
HpkePublicKey: []byte(fmt.Sprintf("hpke%d", i+1)),
},
},
}
Expand All @@ -435,6 +436,7 @@ func TestSubscribeWelcomeMessages(t *testing.T) {
time.Sleep(50 * time.Millisecond)

for _, msg := range msgs {
require.NotNil(t, msg.GetV1().HpkePublicKey, "missing hpke public key")
msgB, err := proto.Marshal(msg)
require.NoError(t, err)

Expand Down

0 comments on commit 54c695c

Please sign in to comment.