Skip to content
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

🗽 Read from contact.status instead of is_stopped/is_blocked #342

Merged
merged 2 commits into from
Aug 25, 2020

Conversation

rowanseymour
Copy link
Contributor

No description provided.

// contact has been deleted or is blocked, ignore this event
if len(contacts) == 0 || contacts[0].IsBlocked() {
// contact has been deleted or is blocked/stopped/archived, ignore this event
if len(contacts) == 0 || contacts[0].Status() != models.ContactStatusActive {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so technically a change of behaviour.. but seems stopped contacts shouldn't get timed events same as blocked?

ContactStatusActive: flows.ContactStatusActive,
ContactStatusBlocked: flows.ContactStatusBlocked,
ContactStatusStopped: flows.ContactStatusStopped,
ContactStatusArchived: flows.ContactStatusArchived,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

writing this had me wondering if single char codes were worth it in the db.. but then writing https://github.com/nyaruka/rapidpro/pull/2926/files#diff-3e440a4651b73b0746e52e4bcf4376f4R30-R31 convinced it was fine to be consistent for now

@codecov
Copy link

codecov bot commented Aug 24, 2020

Codecov Report

Merging #342 into master will increase coverage by 0.02%.
The diff coverage is 30.76%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #342      +/-   ##
==========================================
+ Coverage   54.49%   54.52%   +0.02%     
==========================================
  Files         106      106              
  Lines        8863     8855       -8     
==========================================
- Hits         4830     4828       -2     
+ Misses       3339     3335       -4     
+ Partials      694      692       -2     
Impacted Files Coverage Δ
models/msgs.go 20.71% <0.00%> (ø)
tasks/handler/worker.go 51.85% <0.00%> (ø)
web/ivr/ivr.go 50.58% <0.00%> (ø)
models/contacts.go 56.08% <80.00%> (+0.37%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0a6917e...1c86ee8. Read the comment docs.

@rowanseymour rowanseymour merged commit 809f3b9 into master Aug 25, 2020
@rowanseymour rowanseymour deleted the contact_status_pt2 branch August 25, 2020 13:21
rasoro pushed a commit to Ilhasoft/mailroom that referenced this pull request Mar 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant