mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 10:30:38 +00:00
Prevent NullPointerException when destination is null for some reason
This commit is contained in:
parent
1098b64711
commit
49c4b762b6
1 changed files with 9 additions and 6 deletions
|
@ -1868,7 +1868,7 @@ public class Manager implements Closeable {
|
||||||
) {
|
) {
|
||||||
List<HandleAction> actions = new ArrayList<>();
|
List<HandleAction> actions = new ArrayList<>();
|
||||||
if (content != null) {
|
if (content != null) {
|
||||||
SignalServiceAddress sender;
|
final SignalServiceAddress sender;
|
||||||
if (!envelope.isUnidentifiedSender() && envelope.hasSource()) {
|
if (!envelope.isUnidentifiedSender() && envelope.hasSource()) {
|
||||||
sender = envelope.getSourceAddress();
|
sender = envelope.getSourceAddress();
|
||||||
} else {
|
} else {
|
||||||
|
@ -1895,11 +1895,14 @@ public class Manager implements Closeable {
|
||||||
SignalServiceSyncMessage syncMessage = content.getSyncMessage().get();
|
SignalServiceSyncMessage syncMessage = content.getSyncMessage().get();
|
||||||
if (syncMessage.getSent().isPresent()) {
|
if (syncMessage.getSent().isPresent()) {
|
||||||
SentTranscriptMessage message = syncMessage.getSent().get();
|
SentTranscriptMessage message = syncMessage.getSent().get();
|
||||||
actions.addAll(handleSignalServiceDataMessage(message.getMessage(),
|
final SignalServiceAddress destination = message.getDestination().orNull();
|
||||||
true,
|
if (destination != null) {
|
||||||
sender,
|
actions.addAll(handleSignalServiceDataMessage(message.getMessage(),
|
||||||
message.getDestination().orNull(),
|
true,
|
||||||
ignoreAttachments));
|
sender,
|
||||||
|
destination,
|
||||||
|
ignoreAttachments));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (syncMessage.getRequest().isPresent()) {
|
if (syncMessage.getRequest().isPresent()) {
|
||||||
RequestMessage rm = syncMessage.getRequest().get();
|
RequestMessage rm = syncMessage.getRequest().get();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue