Ensure SMS and MMS messages are sent appropriately.

This commit is contained in:
Greyson Parrelli
2023-01-06 11:27:33 -05:00
parent 5537039e46
commit e2fb65920c
18 changed files with 70 additions and 42 deletions

View File

@@ -185,7 +185,7 @@ final class GroupManagerV1 {
Collections.emptyList(),
Collections.emptyList());
long threadId = MessageSender.send(context, outgoingMessage, -1, false, null, null);
long threadId = MessageSender.send(context, outgoingMessage, -1, MessageSender.SendType.SIGNAL, null, null);
return new GroupActionResult(groupRecipient, threadId, newMemberCount, Collections.emptyList());
}
@@ -209,7 +209,7 @@ final class GroupManagerV1 {
recipientTable.setExpireMessages(recipient.getId(), expirationTime);
OutgoingMessage outgoingMessage = OutgoingMessage.expirationUpdateMessage(recipient, System.currentTimeMillis(), expirationTime * 1000L);
MessageSender.send(context, outgoingMessage, threadId, false, null, null);
MessageSender.send(context, outgoingMessage, threadId, MessageSender.SendType.SIGNAL, null, null);
}
@WorkerThread

View File

@@ -1279,7 +1279,7 @@ final class GroupManagerV2 {
} else {
//noinspection IfStatementWithIdenticalBranches
if (sendToMembers) {
long threadId = MessageSender.send(context, outgoingMessage, -1, false, null, null);
long threadId = MessageSender.send(context, outgoingMessage, -1, MessageSender.SendType.SIGNAL, null, null);
return new RecipientAndThread(groupRecipient, threadId);
} else {
long threadId = SignalDatabase.threads().getOrCreateValidThreadId(outgoingMessage.getRecipient(), -1, outgoingMessage.getDistributionType());