mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 18:40:39 +00:00
Download quote attachment thumbnails and slightly improve the quote output
This commit is contained in:
parent
83d5d53d8a
commit
548c313b4c
2 changed files with 20 additions and 3 deletions
|
@ -1690,6 +1690,23 @@ public class Manager implements Closeable {
|
|||
}
|
||||
}
|
||||
}
|
||||
if (message.getQuote().isPresent()) {
|
||||
final SignalServiceDataMessage.Quote quote = message.getQuote().get();
|
||||
|
||||
for (SignalServiceDataMessage.Quote.QuotedAttachment quotedAttachment : quote.getAttachments()) {
|
||||
final SignalServiceAttachment attachment = quotedAttachment.getThumbnail();
|
||||
if (attachment != null && attachment.isPointer()) {
|
||||
try {
|
||||
retrieveAttachment(attachment.asPointer());
|
||||
} catch (IOException | InvalidMessageException | MissingConfigurationException e) {
|
||||
System.err.println("Failed to retrieve attachment ("
|
||||
+ attachment.asPointer().getRemoteId()
|
||||
+ "): "
|
||||
+ e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (message.getSticker().isPresent()) {
|
||||
final SignalServiceDataMessage.Sticker messageSticker = message.getSticker().get();
|
||||
Sticker sticker = account.getStickerStore().getSticker(messageSticker.getPackId());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue