mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 18:40:39 +00:00
Display more information for received messages
This commit is contained in:
parent
6cfddc0aff
commit
3b2682a57a
2 changed files with 41 additions and 0 deletions
|
@ -1049,6 +1049,19 @@ public class Manager implements Signal {
|
|||
}
|
||||
contact.profileKey = Base64.encodeBytes(message.getProfileKey().get());
|
||||
}
|
||||
if (message.getPreviews().isPresent()) {
|
||||
final List<SignalServiceDataMessage.Preview> previews = message.getPreviews().get();
|
||||
for (SignalServiceDataMessage.Preview preview : previews) {
|
||||
if (preview.getImage().isPresent() && preview.getImage().get().isPointer()) {
|
||||
SignalServiceAttachmentPointer attachment = preview.getImage().get().asPointer();
|
||||
try {
|
||||
retrieveAttachment(attachment);
|
||||
} catch (IOException | InvalidMessageException e) {
|
||||
System.err.println("Failed to retrieve attachment (" + attachment.getId() + "): " + e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void retryFailedReceivedMessages(ReceiveMessageHandler handler, boolean ignoreAttachments) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue