public void setContactName(final RecipientId recipientId, final String givenName, final String familyName) {
var contact = account.getContactStore().getContact(recipientId);
final var builder = contact == null ? Contact.newBuilder() : Contact.newBuilder(contact);
+ builder.withIsHidden(false);
if (givenName != null) {
builder.withGivenName(givenName);
}
var contact = account.getContactStore().getContact(recipientId);
final var builder = contact == null ? Contact.newBuilder() : Contact.newBuilder(contact);
if (blocked) {
- builder.withProfileSharingEnabled(false);
+ builder.withIsProfileSharingEnabled(false);
}
- account.getContactStore().storeContact(recipientId, builder.withBlocked(blocked).build());
+ account.getContactStore().storeContact(recipientId, builder.withIsBlocked(blocked).build());
+ }
+
+ public void setContactHidden(RecipientId recipientId, boolean hidden) {
+ var contact = account.getContactStore().getContact(recipientId);
+ final var builder = contact == null ? Contact.newBuilder() : Contact.newBuilder(contact);
+ account.getContactStore().storeContact(recipientId, builder.withIsHidden(hidden).build());
}
}