mirror of
https://github.com/aljazceru/signal-cli.git
synced 2025-12-31 04:44:19 +01:00
Output "SharedContacts" field from a SignalDataMessage (#529)
* Initial version of SharedContacts from data message. Need to change location of avatar downloaded and fix plain text mode * Made empty strings for json null and fixed plaintext output * Removed old comments, simplified if-statement and added a 'leadingSpaces' field to the print attachments/mentions functions * Added AsamK's changes
This commit is contained in:
@@ -122,6 +122,7 @@ import org.whispersystems.signalservice.api.messages.multidevice.SentTranscriptM
|
||||
import org.whispersystems.signalservice.api.messages.multidevice.SignalServiceSyncMessage;
|
||||
import org.whispersystems.signalservice.api.messages.multidevice.StickerPackOperationMessage;
|
||||
import org.whispersystems.signalservice.api.messages.multidevice.VerifiedMessage;
|
||||
import org.whispersystems.signalservice.api.messages.shared.SharedContact;
|
||||
import org.whispersystems.signalservice.api.profiles.ProfileAndCredential;
|
||||
import org.whispersystems.signalservice.api.profiles.SignalServiceProfile;
|
||||
import org.whispersystems.signalservice.api.push.SignalServiceAddress;
|
||||
@@ -1553,9 +1554,18 @@ public class Manager implements Closeable {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (message.getAttachments().isPresent() && !ignoreAttachments) {
|
||||
for (SignalServiceAttachment attachment : message.getAttachments().get()) {
|
||||
downloadAttachment(attachment);
|
||||
if (!ignoreAttachments) {
|
||||
if (message.getAttachments().isPresent()) {
|
||||
for (SignalServiceAttachment attachment : message.getAttachments().get()) {
|
||||
downloadAttachment(attachment);
|
||||
}
|
||||
}
|
||||
if (message.getSharedContacts().isPresent()) {
|
||||
for (SharedContact contact : message.getSharedContacts().get()) {
|
||||
if (contact.getAvatar().isPresent()) {
|
||||
downloadAttachment(contact.getAvatar().get().getAttachment());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (message.getProfileKey().isPresent() && message.getProfileKey().get().length == 32) {
|
||||
|
||||
Reference in New Issue
Block a user