docbrown/app/workers/notifications
Vaidehi Joshi f71c8b16e7
Allow dynamic authoring of welcome notifications (#6045) [deploy]
* Add "Welcome" type to Broadcasts, allow dynamic "authoring" of Broadcasts

This adds a new `type_of` to the Broadcast model: "Welcome". As we begin to create a new "welcome notification" workflow, we'll categorize them by making them all of the same type.

This also adds a concept of a "welcoming user", which can be set via an ENV var. The WELCOMING_USER_ID will allow us to explicitly set (and change) which user in the database is the one that "sends" welcoming notification. In production, we plan for this to be dev.to/sloan.

* Allow WelcomeNotificationWorker to accept + send any kind of broadcast

This abstracts out the logic of deciding which broadcast to send from the woker into the calling method. This will help us send many different kinds of welcome notifications using one, resuable worker class.

* Raise if a Notification can't be created

* Add STAFF_USER_ID as an ENV var

This is in preparation for moving away from SiteConfig.staff_user_id, and replacing it with an ENV var. We will need to set this in production first, and then make a separate PR to replace all instances of staff_user_id with the newly-set ENV var.
2020-02-12 13:50:37 -08:00
..
mention_worker.rb Change MentionJob to MentionWorker and move to sidekiq (#5312) [deploy] 2020-01-02 07:57:08 -05:00
milestone_worker.rb Change Notifications::MilestoneJob to Notifications::MilestoneWorker and move to sidekiq (#5454) [deploy] 2020-01-15 13:21:56 -05:00
moderation_notification_worker.rb Change ModerationNotificationJob to ModerationNotificationWorker and move to sidekiq (#5683) [deploy] 2020-01-28 08:42:26 -05:00
new_badge_achievement_worker.rb use new_badge_achievement_worker instead of active job (#5358) [deploy] 2020-01-07 08:16:17 -05:00
new_follower_worker.rb Create new NewFollowerWorker and start sending jobs to it (#5556) [deploy] 2020-01-17 15:08:50 -05:00
new_reaction_worker.rb Migrate new reaction job 5305 (#5401) 2020-01-09 09:51:56 -05:00
notifiable_action_worker.rb Replace Notifications::NotifiableActionJob with Notifications::NotifiableActionWorker for Sidekiq (#5588) [deploy] 2020-01-22 09:40:55 -05:00
remove_all_worker.rb Change Notifications::RemoveAllJob to Notifications::RemoveAllWorker and move to sidekiq (#5451) 2020-01-15 12:34:12 -05:00
tag_adjustment_notification_worker.rb Move Notifications::TagAdjustmentNotificationJob to Sidekiq (#5909) [deploy] 2020-02-05 09:52:21 -08:00
update_worker.rb Change Notifications::UpdateJob to Notifications::UpdateWorker and move to sidekiq (#5689) [deploy] 2020-01-28 12:43:50 -05:00
welcome_notification_worker.rb Allow dynamic authoring of welcome notifications (#6045) [deploy] 2020-02-12 13:50:37 -08:00