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;
}
}
}
- 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) {