Remove deprecated SMS fields from recipient table.

This commit is contained in:
Greyson Parrelli
2023-07-31 15:47:27 -04:00
parent e7972d4903
commit e3ec53c2d0
52 changed files with 34 additions and 2044 deletions

View File

@@ -414,8 +414,6 @@ public class MessageContentProcessor {
warn(String.valueOf(content.getTimestamp()), "Got unrecognized message!");
}
resetRecipientToPush(senderRecipient);
if (pending != null) {
warn(content.getTimestamp(), "Pending retry was processed. Deleting.");
ApplicationDependencies.getPendingRetryReceiptCache().delete(pending);
@@ -2219,7 +2217,6 @@ public class MessageContentProcessor {
body,
Collections.emptyList(),
message.getTimestamp(),
-1,
expiresInMillis,
false,
ThreadTable.DistributionTypes.DEFAULT,
@@ -2342,7 +2339,6 @@ public class MessageContentProcessor {
textStoryBody,
pendingAttachments,
sentAtTimestamp,
-1,
0,
false,
ThreadTable.DistributionTypes.DEFAULT,
@@ -2442,7 +2438,6 @@ public class MessageContentProcessor {
message.getDataMessage().get().getBody().orElse(null),
syncAttachments,
message.getTimestamp(),
-1,
TimeUnit.SECONDS.toMillis(message.getDataMessage().get().getExpiresInSeconds()),
viewOnce,
ThreadTable.DistributionTypes.DEFAULT,
@@ -2657,7 +2652,6 @@ public class MessageContentProcessor {
new SlideDeck(),
body,
message.getTimestamp(),
-1,
expiresInMillis,
false,
StoryType.NONE,
@@ -3403,12 +3397,6 @@ public class MessageContentProcessor {
return false;
}
private void resetRecipientToPush(@NonNull Recipient recipient) {
if (recipient.isForceSmsSelection()) {
SignalDatabase.recipients().setForceSmsSelection(recipient.getId(), false);
}
}
private void forceStickerDownloadIfNecessary(long messageId, List<DatabaseAttachment> stickerAttachments) {
if (stickerAttachments.isEmpty()) return;

View File

@@ -284,12 +284,6 @@ open class MessageContentProcessorV2(private val context: Context) {
null
}
}
private fun resetRecipientToPush(recipient: Recipient) {
if (recipient.isForceSmsSelection) {
SignalDatabase.recipients.setForceSmsSelection(recipient.id, false)
}
}
}
/**
@@ -425,8 +419,6 @@ open class MessageContentProcessorV2(private val context: Context) {
}
}
resetRecipientToPush(senderRecipient)
if (pending != null) {
warn(envelope.timestamp, "Pending retry was processed. Deleting.")
ApplicationDependencies.getPendingRetryReceiptCache().delete(pending)