mirror of
https://github.com/AsamK/signal-cli
synced 2025-09-04 05:00:39 +00:00
Initial version of SharedContacts from data message. Need to change location of avatar downloaded and fix plain text mode
This commit is contained in:
parent
129a846cc1
commit
ec77074d0c
9 changed files with 279 additions and 3 deletions
|
@ -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;
|
||||
|
@ -1558,6 +1559,14 @@ public class Manager implements Closeable {
|
|||
downloadAttachment(attachment);
|
||||
}
|
||||
}
|
||||
if (message.getSharedContacts().isPresent() && !ignoreAttachments) {
|
||||
for (SharedContact contact : message.getSharedContacts().get()) {
|
||||
if (contact.getAvatar().isPresent()) {
|
||||
// TODO probably should save to contacts instead
|
||||
downloadAttachment(contact.getAvatar().get().getAttachment());
|
||||
}
|
||||
}
|
||||
}
|
||||
if (message.getProfileKey().isPresent() && message.getProfileKey().get().length == 32) {
|
||||
final ProfileKey profileKey;
|
||||
try {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue