discourse/spec/services
Martin Brennan 793f39139a
FEATURE: Send notifications for time-based and At Desktop bookmark reminders (#9071)
* This PR implements the scheduling and notification system for bookmark reminders. Every 5 minutes a schedule runs to check any reminders that need to be sent before now, limited to **300** reminders at a time. Any leftover reminders will be sent in the next run. This is to avoid having to deal with fickle sidekiq and reminders in the far-flung future, which would necessitate having a background job anyway to clean up any missing `enqueue_at` reminders.

* If a reminder is sent its `reminder_at` time is cleared and the `reminder_last_sent_at` time is filled in. Notifications are only user-level notifications for now.

* All JavaScript and frontend code related to displaying the bookmark reminder notification is contained here. The reminder functionality is now re-enabled in the bookmark modal as well.

* This PR also implements the "Remind me next time I am at my desktop" bookmark reminder functionality. When the user is on a mobile device they are able to select this option. When they choose this option we set a key in Redis saying they have a pending at desktop reminder. The next time they change devices we check if the new device is desktop, and if it is we send reminders using a DistributedMutex. There is also a job to ensure consistency of these reminders in Redis (in case Redis drops the ball) and the at desktop reminders expire after 20 days.

* Also in this PR is a fix to delete all Bookmarks for a user via `UserDestroyer`
2020-03-12 10:16:00 +10:00
..
anonymous_shadow_creator_spec.rb
auto_silence_spec.rb
badge_granter_spec.rb DEV: Improve flaky time-sensitive specs (#9141) 2020-03-10 22:13:17 +01:00
color_scheme_revisor_spec.rb
destroy_task_spec.rb DEV: Default to skipping creating a topic when fabricating categories (#7976) 2019-08-06 11:26:54 +01:00
email_style_updater_spec.rb FEATURE: support SCSS in custom email style 2019-10-23 15:42:37 -04:00
flag_sockpuppets_spec.rb
group_action_logger_spec.rb
group_mentions_updater_spec.rb Link website when reviewing users 2020-02-19 10:18:05 -05:00
group_message_spec.rb DEV: s/\$redis/Discourse\.redis (#8431) 2019-12-03 10:05:53 +01:00
heat_settings_updater_spec.rb FIX: round the calculated heat values 2019-06-06 15:44:55 -04:00
inline_uploads_spec.rb DEV: improve usability of subfolder specs 2019-11-15 16:48:24 +11:00
notification_emailer_spec.rb
post_action_notifier_spec.rb REFACTOR: Rename SiteSetting.disable_edit_notifications to disable_system_edit_notifications (#7958) 2019-07-31 20:20:41 +05:30
post_alerter_spec.rb FIX: when unread reply notification exists don't create new (#8921) 2020-02-14 16:41:42 +11:00
post_owner_changer_spec.rb DEV: Improve flaky time-sensitive specs (#9141) 2020-03-10 22:13:17 +01:00
push_notification_pusher_spec.rb
random_topic_selector_spec.rb DEV: s/\$redis/Discourse\.redis (#8431) 2019-12-03 10:05:53 +01:00
search_indexer_spec.rb FIX: search indexer had various cases where it could fail 2019-06-04 16:21:03 +10:00
site_settings_spec.rb
staff_action_logger_spec.rb FEATURE: Add endpoint to individually update a theme setting (#7789) 2019-06-21 13:49:14 -04:00
themes_spec.rb FEATURE: Rake themes installer (#7848) 2019-07-04 14:33:05 -04:00
topic_status_updater_spec.rb DEV: Upgrading Discourse to Zeitwerk (#8098) 2019-10-02 14:01:53 +10:00
topic_timestamp_changer_spec.rb DEV: Improve flaky time-sensitive specs (#9141) 2020-03-10 22:13:17 +01:00
trust_level_granter_spec.rb
user_activator_spec.rb DEV: Improve flaky time-sensitive specs (#9141) 2020-03-10 22:13:17 +01:00
user_anonymizer_spec.rb DEV: Drop legacy OpenID 2.0 support (#8894) 2020-02-07 17:32:35 +00:00
user_authenticator_spec.rb DEV: Upgrading Discourse to Zeitwerk (#8098) 2019-10-02 14:01:53 +10:00
user_destroyer_spec.rb FEATURE: Send notifications for time-based and At Desktop bookmark reminders (#9071) 2020-03-12 10:16:00 +10:00
user_merger_spec.rb DEV: Drop legacy OpenID 2.0 support (#8894) 2020-02-07 17:32:35 +00:00
user_silencer_spec.rb
user_updater_spec.rb FIX: Flair icon being removed when updating other profile info 2020-02-07 16:26:33 -07:00
username_changer_spec.rb FIX: Quoting a quote preserves the original post information (#8746) 2020-01-22 16:10:23 +02:00
username_checker_service_spec.rb
wildcard_domain_checker_spec.rb SECURITY: vulnerability in WildcardUrlChecker 2019-12-13 09:29:09 -05:00
wildcard_url_checker_spec.rb FIX: Allow any protocol in wildcard url checker (#8651) 2020-01-02 16:03:13 +00:00
word_watcher_spec.rb DEV: s/\$redis/Discourse\.redis (#8431) 2019-12-03 10:05:53 +01:00