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

Feat: Whatsapp notifications #14

Merged
merged 15 commits into from
Dec 17, 2024
Merged

Conversation

jonathansberry
Copy link
Member

@jonathansberry jonathansberry commented Dec 4, 2024

Description

Implements whatsapp notifications.

Since SMS and Whatsapp notifications share a great deal of logic and the same gateway, I have combined the logic into a single flow called "send_phone_notifications". This avoids having to loop through every user in the site to form a condensed copy of their dashboard activity stream twice. I would have maybe liked to find a better name for the action, but I couldn't come up with anything.

I have also refactored the code to make the send_phone_notifications action more readable without so many nested function calls.

I have also moved email_notifications code over into it's own named module.

Testing

Included tests for the whatsapp notifications and the validation of user extra fields. Also included a test to ensure that whatsapp notifications comply with pre-approved templates.

Documentation

Doc string for the send_twilio_notifications action.

Checklist

Put an x in the boxes that apply to this pull request (you can also fill these out after opening the pull request).
You may not need to check all boxes.

  • The Jira ticket for this issue has been updated to "Ready to Review" or equivalent.
  • I have developed these changes in discussion with the appropriate project manager.
  • My code follows the general Fjelltopp documentation (see Confluence).
  • I have made corresponding changes to the Fjelltopp documentation (see Confluence).
  • I have rebased this branch with master.
  • New dependency changes have been committed.
  • I have added automated tests that prove my fix is effective or that my feature works.
  • New and existing tests pass locally with my changes.
  • My changes generate no new warnings.
  • I have performed a self-review of my own code.
  • I have assigned at least one reviewer.
  • I have assigned at least one label to this PR: "patch", "minor", "major".

@jonathansberry jonathansberry force-pushed the feat-whatsapp-notifications branch from 61058bd to 9faa08e Compare December 4, 2024 15:03
@jonathansberry jonathansberry marked this pull request as ready for review December 17, 2024 13:19
@jonathansberry jonathansberry merged commit 127dce4 into master Dec 17, 2024
2 checks passed
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