Skip to content

Commit

Permalink
Fix bug where username wasn't synced to ContactRecord.
Browse files Browse the repository at this point in the history
  • Loading branch information
greyson-signal committed Feb 16, 2023
1 parent ce4e84a commit 4cfba86
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,11 @@ public static boolean profileKeyChanged(StorageRecordUpdate<SignalContactRecord>
}

public static SignalStorageRecord buildAccountRecord(@NonNull Context context, @NonNull Recipient self) {
RecipientTable recipientTable = SignalDatabase.recipients();
RecipientRecord record = recipientTable.getRecordForSync(self.getId());
List<RecipientRecord> pinned = Stream.of(SignalDatabase.threads().getPinnedRecipientIds())
.map(recipientTable::getRecordForSync)
.toList();
RecipientTable recipientTable = SignalDatabase.recipients();
RecipientRecord record = recipientTable.getRecordForSync(self.getId());
List<RecipientRecord> pinned = Stream.of(SignalDatabase.threads().getPinnedRecipientIds())
.map(recipientTable::getRecordForSync)
.toList();

final OptionalBool storyViewReceiptsState = SignalStore.storyValues().getViewedReceiptsEnabled() ? OptionalBool.ENABLED
: OptionalBool.DISABLED;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ public static List<SignalAccountRecord.PinnedConversation> localToRemotePinnedCo
.setHideStory(hideStory)
.setUnregisteredTimestamp(recipient.getSyncExtras().getUnregisteredTimestamp())
.setHidden(recipient.isHidden())
.setUsername(recipient.getUsername())
.build();
}

Expand Down

0 comments on commit 4cfba86

Please sign in to comment.