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

@@ -109,7 +109,7 @@ class MediaSelectionRepository(context: Context) {
StoryType.NONE
}
if (isSms || MessageSender.isLocalSelfSend(context, singleRecipient, isSms)) {
if (isSms || MessageSender.isLocalSelfSend(context, singleRecipient, MessageSender.SendType.SIGNAL)) {
Log.i(TAG, "SMS or local self-send. Skipping pre-upload.")
emitter.onSuccess(MediaSendActivityResult.forTraditionalSend(singleRecipient!!.id, updatedMedia, trimmedBody, sendType, isViewOnce, trimmedMentions, StoryType.NONE))
} else {
@@ -182,7 +182,7 @@ class MediaSelectionRepository(context: Context) {
}
fun isLocalSelfSend(recipient: Recipient?, isSms: Boolean): Boolean {
return MessageSender.isLocalSelfSend(context, recipient, isSms)
return MessageSender.isLocalSelfSend(context, recipient, if (isSms) MessageSender.SendType.SMS else MessageSender.SendType.SIGNAL)
}
@WorkerThread