Skip to content

Commit 14dc9ce

Browse files
authored
fix: disable address normalization when checking blocked MMS senders (#644)
Removed MMS sender address normalization when checking against blocked numbers. Previously, blocking an alphanumeric address such as `VE-ViCARE` would block MMS messages from `VE-ViCARE` and the normalized number `83842273`. Even if that collision never occurs in the real world, removing normalization is the correct move and is consistent with how SMS blocking works.
1 parent 1e3f5e5 commit 14dc9ce

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77
## [Unreleased]
88
### Fixed
99
- Fixed missing notifications in some cases ([#159])
10+
- Fixed incorrect blocking of MMS messages in some rare cases ([#644])
1011

1112
## [1.7.0] - 2025-12-16
1213
### Added
@@ -221,6 +222,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
221222
[#574]: https://github.com/FossifyOrg/Messages/issues/574
222223
[#600]: https://github.com/FossifyOrg/Messages/issues/600
223224
[#610]: https://github.com/FossifyOrg/Messages/issues/610
225+
[#644]: https://github.com/FossifyOrg/Messages/issues/644
224226

225227
[Unreleased]: https://github.com/FossifyOrg/Messages/compare/1.7.0...HEAD
226228
[1.7.0]: https://github.com/FossifyOrg/Messages/compare/1.6.0...1.7.0

app/src/main/kotlin/org/fossify/messages/receivers/MmsReceiver.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import com.klinker.android.send_message.MmsReceivedReceiver
77
import org.fossify.commons.extensions.baseConfig
88
import org.fossify.commons.extensions.getMyContactsCursor
99
import org.fossify.commons.extensions.isNumberBlocked
10-
import org.fossify.commons.extensions.normalizePhoneNumber
1110
import org.fossify.commons.extensions.showErrorToast
1211
import org.fossify.commons.helpers.SimpleContactsHelper
1312
import org.fossify.commons.helpers.ensureBackgroundThread
@@ -27,8 +26,7 @@ import org.fossify.messages.models.Message
2726
class MmsReceiver : MmsReceivedReceiver() {
2827

2928
override fun isAddressBlocked(context: Context, address: String): Boolean {
30-
val normalizedAddress = address.normalizePhoneNumber()
31-
if (context.isNumberBlocked(normalizedAddress)) return true
29+
if (context.isNumberBlocked(address)) return true
3230
if (context.baseConfig.blockUnknownNumbers) {
3331
context.getMyContactsCursor(favoritesOnly = false, withPhoneNumbersOnly = true).use {
3432
val isKnownContact = SimpleContactsHelper(context).existsSync(address, it)

0 commit comments

Comments
 (0)