mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 02:20:39 +00:00
Fix NoSuchElementException in json serialization for messages from an untrusted identity
Fixes #910
This commit is contained in:
parent
90df362c35
commit
3c2fa65e05
1 changed files with 2 additions and 3 deletions
|
@ -3,9 +3,9 @@ package org.asamk.signal.json;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
|
||||||
import org.asamk.signal.manager.Manager;
|
import org.asamk.signal.manager.Manager;
|
||||||
import org.asamk.signal.manager.api.UntrustedIdentityException;
|
|
||||||
import org.asamk.signal.manager.api.MessageEnvelope;
|
import org.asamk.signal.manager.api.MessageEnvelope;
|
||||||
import org.asamk.signal.manager.api.RecipientIdentifier;
|
import org.asamk.signal.manager.api.RecipientIdentifier;
|
||||||
|
import org.asamk.signal.manager.api.UntrustedIdentityException;
|
||||||
import org.asamk.signal.manager.storage.recipients.RecipientAddress;
|
import org.asamk.signal.manager.storage.recipients.RecipientAddress;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -48,8 +48,7 @@ public record JsonMessageEnvelope(
|
||||||
source = sourceAddress.getLegacyIdentifier();
|
source = sourceAddress.getLegacyIdentifier();
|
||||||
sourceNumber = sourceAddress.number().orElse(null);
|
sourceNumber = sourceAddress.number().orElse(null);
|
||||||
sourceUuid = sourceAddress.uuid().map(UUID::toString).orElse(null);
|
sourceUuid = sourceAddress.uuid().map(UUID::toString).orElse(null);
|
||||||
sourceName = m.getContactOrProfileName(RecipientIdentifier.Single.fromAddress(envelope.sourceAddress()
|
sourceName = m.getContactOrProfileName(RecipientIdentifier.Single.fromAddress(sourceAddress));
|
||||||
.get()));
|
|
||||||
} else {
|
} else {
|
||||||
source = null;
|
source = null;
|
||||||
sourceNumber = null;
|
sourceNumber = null;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue