[GH-ISSUE #413] SMS messages will be forwarded N times if blacklisting is enabled #289

Open
opened 2026-02-28 01:24:00 +03:00 by kerem · 0 comments
Owner

Originally created by @alxndrsn on GitHub (Apr 7, 2016).
Original GitHub issue: https://github.com/ushahidi/SMSSync/issues/413

From PostMessage.routeSms():

// Process blacklist
for (SyncUrl syncUrl : syncUrlList) {
    if (mPrefsFactory.enableBlacklist().get()) {
        for (Filter filter : filters) {

            if (filter.getPhoneNumber().equals(message.getMessageFrom())) {
                ...
                return false;
            } else {
                TRY TO SEND MESSAGE
            }

        }
    }
}

By my reading, this will forward every SMS to every sync URL once for every item in the blacklist*.

*Unless it's from a blacklisted number, in which case the number of duplicates sent is decreased by one.

Originally created by @alxndrsn on GitHub (Apr 7, 2016). Original GitHub issue: https://github.com/ushahidi/SMSSync/issues/413 From [`PostMessage.routeSms()`](https://github.com/alxndrsn/SMSSync/blob/develop/smssync/src/main/java/org/addhen/smssync/data/message/PostMessage.java#L108): ``` java // Process blacklist for (SyncUrl syncUrl : syncUrlList) { if (mPrefsFactory.enableBlacklist().get()) { for (Filter filter : filters) { if (filter.getPhoneNumber().equals(message.getMessageFrom())) { ... return false; } else { TRY TO SEND MESSAGE } } } } ``` By my reading, this will forward every SMS to every sync URL once **_for every item in the blacklist_***. *Unless it's from a blacklisted number, in which case the number of duplicates sent is decreased by one.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/SMSSync#289
No description provided.