diff --git a/qksms/src/main/java/interactor/ReceiveMms.kt b/qksms/src/main/java/interactor/ReceiveMms.kt index 5cab6f1c..3315a79d 100644 --- a/qksms/src/main/java/interactor/ReceiveMms.kt +++ b/qksms/src/main/java/interactor/ReceiveMms.kt @@ -37,6 +37,7 @@ class ReceiveMms @Inject constructor( return Flowable.just(params) .flatMap { uri -> syncManager.syncMessage(uri) } // Sync the message .mapNotNull { message -> messageRepo.getOrCreateConversation(message.threadId) } // Map message to conversation + .filter { conversation -> !conversation.blocked } // Don't notify for blocked conversations .doOnNext { conversation -> if (conversation.archived) messageRepo.markUnarchived(conversation.id) } // Unarchive conversation if necessary .doOnNext { conversation -> notificationManager.update(conversation.id) } // Update the notification } diff --git a/qksms/src/main/java/interactor/ReceiveSms.kt b/qksms/src/main/java/interactor/ReceiveSms.kt index 355067e4..beaca33e 100644 --- a/qksms/src/main/java/interactor/ReceiveSms.kt +++ b/qksms/src/main/java/interactor/ReceiveSms.kt @@ -44,6 +44,7 @@ class ReceiveSms @Inject constructor( messageRepo.insertReceivedSms(address, body, time) // Add the message to the db } .mapNotNull { message -> messageRepo.getOrCreateConversation(message.threadId) } // Map message to conversation + .filter { conversation -> !conversation.blocked } // Don't notify for blocked conversations .doOnNext { conversation -> if (conversation.archived) messageRepo.markUnarchived(conversation.id) } // Unarchive conversation if necessary .doOnNext { conversation -> notificationManager.update(conversation.id) } // Update the notification }