mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 09:20:19 +01:00
Insert resent messages at the proper location.
This commit is contained in:
committed by
Alex Hart
parent
90a27d2227
commit
a1c8573fad
@@ -26,8 +26,9 @@ public class IncomingMediaMessage {
|
||||
private final String body;
|
||||
private final boolean push;
|
||||
private final long sentTimeMillis;
|
||||
private final long serverTimeMillis;
|
||||
private final int subscriptionId;
|
||||
private final long serverTimeMillis;
|
||||
private final long receivedTimeMillis;
|
||||
private final int subscriptionId;
|
||||
private final long expiresIn;
|
||||
private final boolean expirationUpdate;
|
||||
private final QuoteModel quote;
|
||||
@@ -45,6 +46,7 @@ public class IncomingMediaMessage {
|
||||
String body,
|
||||
long sentTimeMillis,
|
||||
long serverTimeMillis,
|
||||
long receivedTimeMillis,
|
||||
List<Attachment> attachments,
|
||||
int subscriptionId,
|
||||
long expiresIn,
|
||||
@@ -53,19 +55,20 @@ public class IncomingMediaMessage {
|
||||
boolean unidentified,
|
||||
Optional<List<Contact>> sharedContacts)
|
||||
{
|
||||
this.from = from;
|
||||
this.groupId = groupId.orNull();
|
||||
this.sentTimeMillis = sentTimeMillis;
|
||||
this.serverTimeMillis = serverTimeMillis;
|
||||
this.body = body;
|
||||
this.push = false;
|
||||
this.subscriptionId = subscriptionId;
|
||||
this.expiresIn = expiresIn;
|
||||
this.expirationUpdate = expirationUpdate;
|
||||
this.viewOnce = viewOnce;
|
||||
this.quote = null;
|
||||
this.unidentified = unidentified;
|
||||
this.serverGuid = null;
|
||||
this.from = from;
|
||||
this.groupId = groupId.orNull();
|
||||
this.sentTimeMillis = sentTimeMillis;
|
||||
this.serverTimeMillis = serverTimeMillis;
|
||||
this.receivedTimeMillis = receivedTimeMillis;
|
||||
this.body = body;
|
||||
this.push = false;
|
||||
this.subscriptionId = subscriptionId;
|
||||
this.expiresIn = expiresIn;
|
||||
this.expirationUpdate = expirationUpdate;
|
||||
this.viewOnce = viewOnce;
|
||||
this.quote = null;
|
||||
this.unidentified = unidentified;
|
||||
this.serverGuid = null;
|
||||
|
||||
this.attachments.addAll(attachments);
|
||||
this.sharedContacts.addAll(sharedContacts.or(Collections.emptyList()));
|
||||
@@ -75,6 +78,7 @@ public class IncomingMediaMessage {
|
||||
public IncomingMediaMessage(@NonNull RecipientId from,
|
||||
long sentTimeMillis,
|
||||
long serverTimeMillis,
|
||||
long receivedTimeMillis,
|
||||
int subscriptionId,
|
||||
long expiresIn,
|
||||
boolean expirationUpdate,
|
||||
@@ -90,17 +94,18 @@ public class IncomingMediaMessage {
|
||||
Optional<Attachment> sticker,
|
||||
@Nullable String serverGuid)
|
||||
{
|
||||
this.push = true;
|
||||
this.from = from;
|
||||
this.sentTimeMillis = sentTimeMillis;
|
||||
this.serverTimeMillis = serverTimeMillis;
|
||||
this.body = body.orNull();
|
||||
this.subscriptionId = subscriptionId;
|
||||
this.expiresIn = expiresIn;
|
||||
this.expirationUpdate = expirationUpdate;
|
||||
this.viewOnce = viewOnce;
|
||||
this.quote = quote.orNull();
|
||||
this.unidentified = unidentified;
|
||||
this.push = true;
|
||||
this.from = from;
|
||||
this.sentTimeMillis = sentTimeMillis;
|
||||
this.serverTimeMillis = serverTimeMillis;
|
||||
this.receivedTimeMillis = receivedTimeMillis;
|
||||
this.body = body.orNull();
|
||||
this.subscriptionId = subscriptionId;
|
||||
this.expiresIn = expiresIn;
|
||||
this.expirationUpdate = expirationUpdate;
|
||||
this.viewOnce = viewOnce;
|
||||
this.quote = quote.orNull();
|
||||
this.unidentified = unidentified;
|
||||
|
||||
if (group.isPresent()) this.groupId = GroupUtil.idFromGroupContextOrThrow(group.get());
|
||||
else this.groupId = null;
|
||||
@@ -153,6 +158,10 @@ public class IncomingMediaMessage {
|
||||
return serverTimeMillis;
|
||||
}
|
||||
|
||||
public long getReceivedTimeMillis() {
|
||||
return receivedTimeMillis;
|
||||
}
|
||||
|
||||
public long getExpiresIn() {
|
||||
return expiresIn;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user