-
-
Notifications
You must be signed in to change notification settings - Fork 219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not autorespond to numbers on Blacklist #750
Comments
We should also support blacklisting number like "Orange" since the telecom provider can create messages originating from that string. Also does this feature only apply to auto-responses? What if a valid form is sent via a blacklisted from string? I assume we need to ignore responses setup by registration configurations or any other feature. |
We are finding several projects that end up in message loops with the operator when the gateway is out of credit. Once credit is added, all the pending auto-replies get sent, eating up the newly added credit. @browndav we already have a similar feature for not sending a number to the gateway, so would it be low effort to do something similar that to avoid sending to any other number as well? As pointed out by @mandric, we should accept text strings as well as phone numbers. |
If someone jumps in to take this, a good place to start looking is how we avoid message loops with the |
How do we plan to define a blacklist? Could it be a comma separated list of strings in app_settings somewhere? |
Also assuming we need this feature on all branches/release channels. |
Correct, we are getting urgent requests for this from many projects so we should push this to all branches. Having it as a comma separated field in |
Should we also consider having a "whitelist" option, so you only setup responses to numbers that are in the facilities list or something? |
Thinking the blacklisted function might behave like this: isBlacklisted(str, from)
|
That would seem to work well @mandric. I think that having a whitelist would be good to include as well. My understanding is that you could send to a whitelisted number, even if it is in the blacklisted list. Is that right? Also, are we checking if it is a valid number before sending? This would be useful to know for creating the blacklists. |
Nope, no checking if phone numbers are valid, we just take the number the gateway passed to us in the message and use it. |
It might be useful to put a |
Also for the record not crazy about using the term “blacklist” but can’t think of anything else at the moment. Maybe “deny list” or “reject list”? |
…ion. outgoing_deny_list is a new configuration that is a comma separated list of strings. If a string in that list matches the beginning of the phone we are setting up a response to then this transition is ignored. The transition will never fire because the filter will fail on those documents and those message will be left without an auto-reply. Issue: medic/cht-core#750
Not sure if I should flag/invalidate the record (add an error to it). Currently just shows up as valid with denied messages. |
Looks good. I've added one comment about style preference. |
Henok, a new RC build should be available shortly with this update. Let me know if you have any time to acceptance test this one again, thanks! |
@henokgetachew or @abbyad when you get a chance please acceptance test. Latest RC is running here: https://rc.dev.medicmobile.org/ |
Outgoing deny list will now be applied to schedules and responses generated on reports. So instead of seeing `scheduled` or `pending` state on a message you will see `denied`. Moved `isOutgoingAllowed`, `_isMessageFromGateway` and related tests into utils library so schedule creation and report validation and response messages can make use of it. Calling `messages.addMessage` or `uitls.addScheduledMessage` now transparently checks the outgoing deny list and assigns a `denied` state when appropriate. I removed some odd logic in `addScheduledMessage` because it's not used or documented anywhere and is error prone. There was a check for `doc.muted` field when creating a scheduled message. I looked through the code and fairly certain this property is not set or used by anything.
Following up on #201, users and administrators need to be able to ignore/hide messages from specific numbers or ranges of numbers. This is particularly important for MNO messages, which we do not want to respond to.
First iteration may just be available in
app_settings
, but eventually we will need some design work to decide the best way to present this to users.The text was updated successfully, but these errors were encountered: