mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-23 12:38:33 +00:00
Fix potential NPE when pinning a PNI chat.
This commit is contained in:
committed by
Cody Henthorne
parent
5e1ebaa5d4
commit
55bce1fa12
@@ -92,7 +92,7 @@ public final class StorageSyncModels {
|
|||||||
|
|
||||||
private static @NonNull SignalAccountRecord.PinnedConversation localToRemotePinnedConversation(@NonNull RecipientRecord settings) {
|
private static @NonNull SignalAccountRecord.PinnedConversation localToRemotePinnedConversation(@NonNull RecipientRecord settings) {
|
||||||
switch (settings.getRecipientType()) {
|
switch (settings.getRecipientType()) {
|
||||||
case INDIVIDUAL: return SignalAccountRecord.PinnedConversation.forContact(new SignalServiceAddress(settings.getAci(), settings.getE164()));
|
case INDIVIDUAL: return SignalAccountRecord.PinnedConversation.forContact(new SignalServiceAddress(settings.getServiceId(), settings.getE164()));
|
||||||
case GV1: return SignalAccountRecord.PinnedConversation.forGroupV1(settings.getGroupId().requireV1().getDecodedId());
|
case GV1: return SignalAccountRecord.PinnedConversation.forGroupV1(settings.getGroupId().requireV1().getDecodedId());
|
||||||
case GV2: return SignalAccountRecord.PinnedConversation.forGroupV2(settings.getSyncExtras().getGroupMasterKey().serialize());
|
case GV2: return SignalAccountRecord.PinnedConversation.forGroupV2(settings.getSyncExtras().getGroupMasterKey().serialize());
|
||||||
default : throw new AssertionError("Unexpected group type!");
|
default : throw new AssertionError("Unexpected group type!");
|
||||||
|
|||||||
Reference in New Issue
Block a user