Add phone-number-sharing field to versioned profile

Co-authored-by: Katherine <katherine@signal.org>
This commit is contained in:
Jonathan Klabunde Tomer
2023-12-19 11:20:04 -08:00
committed by GitHub
parent 3b509bf820
commit 9d3d4a3698
12 changed files with 197 additions and 137 deletions

View File

@@ -48,6 +48,7 @@ public class ProfileGrpcHelper {
maybeProfile.map(VersionedProfile::about).map(ByteString::copyFrom).ifPresent(responseBuilder::setAbout);
maybeProfile.map(VersionedProfile::aboutEmoji).map(ByteString::copyFrom).ifPresent(responseBuilder::setAboutEmoji);
maybeProfile.map(VersionedProfile::avatar).ifPresent(responseBuilder::setAvatar);
maybeProfile.map(VersionedProfile::phoneNumberSharing).map(ByteString::copyFrom).ifPresent(responseBuilder::setPhoneNumberSharing);
// Allow requests where either the version matches the latest version on Account or the latest version on Account
// is empty to read the payment address.

View File

@@ -141,6 +141,7 @@ public class ProfileGrpcService extends ReactorProfileGrpc.ProfileImplBase {
request.getAboutEmoji().toByteArray(),
request.getAbout().toByteArray(),
request.getPaymentAddress().toByteArray(),
request.getPhoneNumberSharing().toByteArray(),
request.getCommitment().toByteArray())));
final List<Mono<?>> updates = new ArrayList<>(2);