mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 09:20:19 +01:00
GroupId class.
This commit is contained in:
committed by
Greyson Parrelli
parent
a73a73e42c
commit
a860315587
@@ -5,9 +5,9 @@ import androidx.annotation.NonNull;
|
||||
import org.thoughtcrime.securesms.attachments.Attachment;
|
||||
import org.thoughtcrime.securesms.attachments.PointerAttachment;
|
||||
import org.thoughtcrime.securesms.contactshare.Contact;
|
||||
import org.thoughtcrime.securesms.groups.GroupId;
|
||||
import org.thoughtcrime.securesms.linkpreview.LinkPreview;
|
||||
import org.thoughtcrime.securesms.recipients.RecipientId;
|
||||
import org.thoughtcrime.securesms.util.GroupUtil;
|
||||
import org.whispersystems.libsignal.util.guava.Optional;
|
||||
import org.whispersystems.signalservice.api.messages.SignalServiceAttachment;
|
||||
import org.whispersystems.signalservice.api.messages.SignalServiceGroup;
|
||||
@@ -19,7 +19,7 @@ import java.util.List;
|
||||
public class IncomingMediaMessage {
|
||||
|
||||
private final RecipientId from;
|
||||
private final String groupId;
|
||||
private final GroupId groupId;
|
||||
private final String body;
|
||||
private final boolean push;
|
||||
private final long sentTimeMillis;
|
||||
@@ -35,7 +35,7 @@ public class IncomingMediaMessage {
|
||||
private final List<LinkPreview> linkPreviews = new LinkedList<>();
|
||||
|
||||
public IncomingMediaMessage(@NonNull RecipientId from,
|
||||
Optional<String> groupId,
|
||||
Optional<GroupId> groupId,
|
||||
String body,
|
||||
long sentTimeMillis,
|
||||
List<Attachment> attachments,
|
||||
@@ -86,7 +86,7 @@ public class IncomingMediaMessage {
|
||||
this.quote = quote.orNull();
|
||||
this.unidentified = unidentified;
|
||||
|
||||
if (group.isPresent()) this.groupId = GroupUtil.getEncodedId(group.get().getGroupId(), false);
|
||||
if (group.isPresent()) this.groupId = GroupId.v1(group.get().getGroupId());
|
||||
else this.groupId = null;
|
||||
|
||||
this.attachments.addAll(PointerAttachment.forPointers(attachments));
|
||||
@@ -114,7 +114,7 @@ public class IncomingMediaMessage {
|
||||
return from;
|
||||
}
|
||||
|
||||
public String getGroupId() {
|
||||
public GroupId getGroupId() {
|
||||
return groupId;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user