Updated the code to use the network offset time everywhere relevant (#1111)

* Updated the code to use the network offset time everywhere relevant

* Updated the SnodeAPI.nowWithOffset to use @JvmStatic
This commit is contained in:
Morgan Pretty
2023-03-31 10:11:30 +11:00
committed by GitHub
parent 405b8c7d28
commit 5e28af2be4
22 changed files with 67 additions and 48 deletions

View File

@@ -319,8 +319,8 @@ public class SignalServiceDataMessage {
return this;
}
public SignalServiceDataMessage build() {
if (timestamp == 0) timestamp = System.currentTimeMillis();
public SignalServiceDataMessage build(long fallbackTimestamp) {
if (timestamp == 0) timestamp = fallbackTimestamp;
// closedGroupUpdate is always null because we don't use SignalServiceDataMessage to send them (we use ClosedGroupUpdateMessageSendJob)
return new SignalServiceDataMessage(timestamp, group, attachments, body, expiresInSeconds, expirationUpdate, profileKey, quote, sharedContacts, previews,
null, syncTarget);