discourse/app/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
..
spam_rule FIX: Use default locale for flag reasons 2019-07-12 12:04:23 +02:00
anonymous_shadow_creator.rb FEATURE: introduce dedicated storage and DB constraints for anon users 2019-05-29 14:26:24 +10:00
badge_granter.rb FEATURE: Replace existing badge owners when using the bulk award feature (#8770) 2020-01-23 14:14:58 -03:00
color_scheme_revisor.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
destroy_task.rb REFACTOR: Cleanup rake tasks based on feedback 2019-07-18 19:15:01 -06:00
email_style_updater.rb FEATURE: support SCSS in custom email style 2019-10-23 15:42:37 -04:00
group_action_logger.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
group_mentions_updater.rb FIX: Mentions updater should work regardless of `.notify` 2020-02-18 16:02:26 -05:00
group_message.rb DEV: s/\$redis/Discourse\.redis (#8431) 2019-12-03 10:05:53 +01:00
handle_chunk_upload.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
heat_settings_updater.rb FIX: round the calculated heat values 2019-06-06 15:44:55 -04:00
inline_uploads.rb FIX: parallel spec system needs a dedicated upload folder for each worker. (#8547) 2019-12-18 11:21:57 +05:30
notification_consolidator.rb DEV: handle all notification consolidations in new 'NotificationConsolidator' class. 2019-12-05 14:36:06 +05:30
notification_emailer.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
post_action_notifier.rb FIX: check for presence of liked post before creating notification 2019-10-24 14:25:56 +05:30
post_alerter.rb FIX: when unread reply notification exists don't create new (#8921) 2020-02-14 16:41:42 +11:00
post_owner_changer.rb DEV: Upgrading Discourse to Zeitwerk (#8098) 2019-10-02 14:01:53 +10:00
push_notification_pusher.rb DEV: Upgrading Discourse to Zeitwerk (#8098) 2019-10-02 14:01:53 +10:00
random_topic_selector.rb DEV: s/\$redis/Discourse\.redis (#8431) 2019-12-03 10:05:53 +01:00
search_indexer.rb FEATURE: Tag synonyms 2019-12-04 13:33:51 -05:00
site_settings_task.rb DEV: Apply Rubocop redundant return style 2019-11-14 15:10:51 -05:00
staff_action_logger.rb FIX: Mark secure media upload insecure automatically if used for theme component (#8413) 2019-11-28 07:32:17 +10:00
themes_install_task.rb DEV: Apply Rubocop redundant return style 2019-11-14 15:10:51 -05:00
topic_status_updater.rb FIX: Disallow featuring hidden topics (#8814) 2020-01-30 10:00:49 -06:00
topic_timestamp_changer.rb DEV: s/\$redis/Discourse\.redis (#8431) 2019-12-03 10:05:53 +01:00
tracked_topics_updater.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
trust_level_granter.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
user_action_manager.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
user_activator.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
user_anonymizer.rb DEV: Drop legacy OpenID 2.0 support (#8894) 2020-02-07 17:32:35 +00:00
user_authenticator.rb FIX: Clear authentication data from session after create account (#8040) 2019-09-12 12:11:12 +01:00
user_destroyer.rb FEATURE: Send notifications for time-based and At Desktop bookmark reminders (#9071) 2020-03-12 10:16:00 +10:00
user_merger.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
user_notification_renderer.rb FIX: during concurrent emails generation renderer should not be reused 2019-10-10 08:50:48 +11:00
user_silencer.rb DEV: update rubocop to version 0.77 2019-12-10 11:48:39 +11:00
user_updater.rb FIX: Flair icon being removed when updating other profile info 2020-02-07 16:26:33 -07:00
username_changer.rb DEV: Upgrading Discourse to Zeitwerk (#8098) 2019-10-02 14:01:53 +10:00
username_checker_service.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
wildcard_domain_checker.rb SECURITY: vulnerability in WildcardUrlChecker 2019-12-13 09:29:09 -05:00
wildcard_url_checker.rb FIX: Allow any protocol in wildcard url checker (#8651) 2020-01-02 16:03:13 +00:00
word_watcher.rb FIX: Various watched words improvements 2019-08-02 15:29:12 +01:00