Disable replying to invalid short codes via notification

This commit is contained in:
Naveen 2023-01-07 17:22:32 +05:30
parent 26533ff52e
commit 35a98d4823
1 changed files with 2 additions and 1 deletions

View File

@ -22,6 +22,7 @@ import com.simplemobiletools.commons.helpers.isOreoPlus
import com.simplemobiletools.smsmessenger.R
import com.simplemobiletools.smsmessenger.activities.ThreadActivity
import com.simplemobiletools.smsmessenger.extensions.config
import com.simplemobiletools.smsmessenger.messaging.isShortCodeWithLetters
import com.simplemobiletools.smsmessenger.receivers.DirectReplyReceiver
import com.simplemobiletools.smsmessenger.receivers.MarkAsReadReceiver
@ -52,7 +53,7 @@ class NotificationHelper(private val context: Context) {
PendingIntent.getBroadcast(context, notificationId, markAsReadIntent, PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_MUTABLE)
var replyAction: NotificationCompat.Action? = null
if (isNougatPlus()) {
if (isNougatPlus() && !isShortCodeWithLetters(address)) {
val replyLabel = context.getString(R.string.reply)
val remoteInput = RemoteInput.Builder(REPLY)
.setLabel(replyLabel)