docbrown/spec
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
..
black_box Adjust type tags for RSpec (#4864) 2019-11-20 13:01:30 -05:00
decorators Flaky Spec Try 2: Article Decorator properly handles Names (#6048) 2020-02-12 16:32:38 -05:00
factories User counters using PostgreSQL JSON (#5373) [deploy] 2020-02-03 10:35:08 -05:00
fixtures Creating podcasts by users (#3730) [deploy] 2020-01-08 16:14:25 -05:00
helpers Fix linting (#4933) [deploy] 2019-11-26 08:35:34 -05:00
initializers Hookup Elasticsearch in travis (#5871) 2020-02-04 08:20:14 -05:00
jobs Remove Users::EstimateDefaultLanguageJob & spec (#5956) [deploy] 2020-02-07 12:40:12 -08:00
labor Add mod channel automation to tags (#5731) [deploy] 2020-02-06 16:27:12 -05:00
lib Log in Datadog When Sidekiq Worker Fails for Final Time (#5942) [deploy] 2020-02-10 08:56:41 -05:00
liquid_tags Refactor ProfileImage (#5803) 2020-02-07 08:56:16 -05:00
mailers [deploy] Finalize deleting user associations (#5624) 2020-01-23 11:29:47 -05:00
models Change BustReactableCacheJob to BustReactableCacheWorker and move to sidekiq (#5582) [deploy] 2020-02-12 11:50:40 -05:00
observers Move SlackBotPingJob to Sidekiq (#5615) 2020-01-22 08:24:33 -05:00
policies Fix Rubocop lints (#5155) 2019-12-19 10:09:37 -05:00
requests Allow dynamic authoring of welcome notifications (#6045) [deploy] 2020-02-12 13:50:37 -08:00
routing Enabled rubocop/lint (#2130) 2019-03-21 10:53:44 -04:00
services Allow dynamic authoring of welcome notifications (#6045) [deploy] 2020-02-12 13:50:37 -08:00
support Fix error handling bugs in stackexchange tag (#5490) 2020-01-20 14:43:25 -05:00
system Consolidate server side main article feed logic (#5953) [deploy] 2020-02-12 08:43:20 -06:00
uploaders Adjust type tags for RSpec (#4864) 2019-11-20 13:01:30 -05:00
views Improve test speed (#3957) [ci skip] 2019-09-12 16:17:20 -04:00
workers Allow dynamic authoring of welcome notifications (#6045) [deploy] 2020-02-12 13:50:37 -08:00
rails_helper.rb Add Code To Setup the Elasticsearch Tag Index (#5919) [deploy] 2020-02-06 11:46:11 -05:00
spec_helper.rb Temporarily comment out random (#2486) 2019-04-18 11:56:38 -04:00