Skip to content
This repository has been archived by the owner on Jan 28, 2019. It is now read-only.

refactored outgoing deny list config handling. #75

Merged
merged 3 commits into from
Nov 11, 2015

Conversation

mandric
Copy link
Contributor

@mandric mandric commented Nov 11, 2015

Issue: medic/cht-core#750

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.

Milan Andric added 3 commits November 11, 2015 19:13
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.
mandric added a commit that referenced this pull request Nov 11, 2015
refactored outgoing deny list config handling.
@mandric mandric merged commit 79f72a4 into master Nov 11, 2015
@mandric mandric deleted the 750-autoreply-deny-list-part2 branch July 15, 2016 01:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants