Skip to content

Commit

Permalink
Stop sending presentation in responses
Browse files Browse the repository at this point in the history
This is no longer needed now that clients aren't reading the field.
  • Loading branch information
akonradi-signal authored and jon-signal committed Mar 15, 2024
1 parent f2d8bd2 commit 2ae6d9b
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,6 @@ public List<ModifyMemberProfileKeyAction> validateModifyMemberProfileKeys(GroupU
return ModifyMemberProfileKeyAction.newBuilder()
.setUserId(ByteString.copyFrom(presentation.getUuidCiphertext().serialize()))
.setProfileKey(ByteString.copyFrom(presentation.getProfileKeyCiphertext().serialize()))
.setPresentation(ByteString.copyFrom(presentation.getStructurallyValidV1PresentationBytes()))
// TODO: some time after clients stop reading the presentation, stop setting it here
.build();
}).collect(Collectors.toList());
if (CollectionUtil.containsDuplicates(validatedActions.stream().map(ModifyMemberProfileKeyAction::getUserId))) {
Expand All @@ -289,8 +287,6 @@ public List<PromoteMemberPendingProfileKeyAction> validatePromoteMembersPendingP
return PromoteMemberPendingProfileKeyAction.newBuilder()
.setUserId(ByteString.copyFrom(presentation.getUuidCiphertext().serialize()))
.setProfileKey(ByteString.copyFrom(presentation.getProfileKeyCiphertext().serialize()))
.setPresentation(ByteString.copyFrom(presentation.getStructurallyValidV1PresentationBytes()))
// TODO: some time after clients stop reading the presentation, stop setting it here
.build();
}).collect(Collectors.toList());
if (CollectionUtil.containsDuplicates(validatedActions.stream().map(PromoteMemberPendingProfileKeyAction::getUserId))) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2213,7 +2213,7 @@ void testModifyMemberPresentation(final Instant issueTime, final Instant lastVal
expectedGroupChangeResponseBuilder.getModifyMemberProfileKeysBuilder(0)
.setUserId(ByteString.copyFrom(validUserTwoPresentationUpdate.getUuidCiphertext().serialize()))
.setProfileKey(ByteString.copyFrom(validUserTwoPresentationUpdate.getProfileKeyCiphertext().serialize()))
.setPresentation(ByteString.copyFrom(validUserTwoPresentationUpdate.getStructurallyValidV1PresentationBytes()));
.clearPresentation();

clock.pin(issueTime);
Response response = resources.getJerseyTest()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2082,7 +2082,7 @@ void testModifyMemberPresentation() throws Exception {
expectedGroupChangeResponseBuilder.getModifyMemberProfileKeysBuilder(0)
.setUserId(ByteString.copyFrom(validUserTwoPresentationUpdate.getUuidCiphertext().serialize()))
.setProfileKey(ByteString.copyFrom(validUserTwoPresentationUpdate.getProfileKeyCiphertext().serialize()))
.setPresentation(ByteString.copyFrom(validUserTwoPresentationUpdate.getStructurallyValidV1PresentationBytes()));
.clearPresentation();

Response response = resources.getJerseyTest()
.target("/v1/groups/")
Expand Down

0 comments on commit 2ae6d9b

Please sign in to comment.