discourse/spec/fabricators
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
..
api_key_fabricator.rb
badge_fabricator.rb
bookmark_fabricator.rb FEATURE: Send notifications for time-based and At Desktop bookmark reminders (#9071) 2020-03-12 10:16:00 +10:00
category_fabricator.rb FIX: Make inline oneboxes work with secured topics in secured contexts (#8895) 2020-02-12 12:11:28 +02:00
category_group_fabricator.rb
color_scheme_color_fabricator.rb
color_scheme_fabricator.rb
email_change_request_fabricator.rb
email_log_fabricator.rb
email_token_fabricator.rb
embeddable_host_fabricator.rb
flag_fabricator.rb
group_fabricator.rb
group_history_fabricator.rb
group_request_fabricator.rb
group_user_fabricator.rb
ignored_user.rb
incoming_email_fabricator.rb
incoming_link_fabricator.rb
invite_fabricator.rb
like_fabricator.rb
muted_user.rb
notification_fabricator.rb
optimized_image_fabricator.rb
permalink_fabricator.rb
post_action_fabricator.rb FIX: correct user serializer user method for extended serializer (#8590) 2019-12-19 09:48:01 -08:00
post_custom_field_fabricator.rb
post_detail_fabricator.rb
post_fabricator.rb FIX: parallel spec system needs a dedicated upload folder for each worker. (#8547) 2019-12-18 11:21:57 +05:30
post_reply_key_fabricator.rb
post_revision_fabricator.rb
reviewable_claimed_topic_fabricator.rb
reviewable_fabricator.rb FIX: Granting staff status should auto-approve users waiting approval (#8533) 2019-12-12 16:26:38 -03:00
screened_email_fabricator.rb
screened_ip_address_fabricator.rb
screened_url_fabricator.rb
search_log_fabricator.rb
shared_draft_fabricator.rb
single_sign_on_record_fabricator.rb
skipped_email_log_fabricator.rb
tag_fabricator.rb
tag_group_fabricator.rb
theme_fabricator.rb
topic_allowed_group_fabricator.rb
topic_allowed_user_fabricator.rb
topic_embed_fabricator.rb
topic_fabricator.rb
topic_tag_fabricator.rb
topic_timer_fabricator.rb
topic_user_fabricator.rb
upload_fabricator.rb FIX: Mitigate issue where legacy pre-secure hotlinked media would not be redownloaded (#8802) 2020-01-29 10:11:38 +10:00
user_action_fabricator.rb
user_api_key_fabricator.rb
user_avatar_fabricator.rb
user_email_fabricator.rb
user_fabricator.rb
user_field_fabricator.rb
user_option_fabricator.rb
user_profile_fabricator.rb
user_second_factor_fabricator.rb
user_security_key_fabricator.rb
watched_word_fabricator.rb
web_crawler_request_fabricator.rb
web_hook_fabricator.rb