discourse/app/assets/javascripts
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
..
admin REFACTOR: removes legacy bootstrap css class (#9174) 2020-03-11 15:31:29 +01:00
confirm-new-email Support for transpiling .js files (#9160) 2020-03-11 09:43:55 -04:00
discourse FEATURE: Send notifications for time-based and At Desktop bookmark reminders (#9071) 2020-03-12 10:16:00 +10:00
discourse-common FEATURE: Send notifications for time-based and At Desktop bookmark reminders (#9071) 2020-03-12 10:16:00 +10:00
docs
ember-addons DEV: Deprecate ember module imports (#9011) 2020-02-21 15:56:49 +01:00
locales DEV: Import ember ENV instead of Ember.testing (#8305) 2019-11-07 11:20:35 -06:00
pretty-text FIX: Use full URL for secure attachments when secure media enabled (#9037) 2020-03-04 10:11:08 +11:00
select-kit DEV: enforces ember-template-lint: no-triple-curlies (#9165) 2020-03-11 09:23:10 +01:00
wizard DEV: enforces ember-template-lint: no-triple-curlies (#9165) 2020-03-11 09:23:10 +01:00
activate-account.js.es6 Support for transpiling .js files (#9160) 2020-03-11 09:43:55 -04:00
admin.js.erb
application.js REFACTOR: Remove InputValidation which was simply an Ember.Object 2019-11-11 15:48:56 -05:00
auto-redirect.js.es6 Support for transpiling .js files (#9160) 2020-03-11 09:43:55 -04:00
deprecated.js
discourse-loader.js DEV: Clean up Ember imports (#8979) 2020-03-06 23:49:28 +01:00
discourse-objects.js
discourse.js.es6 DEV: Clean up Ember imports (#8979) 2020-03-06 23:49:28 +01:00
embed-application.js.es6 Support for transpiling .js files (#9160) 2020-03-11 09:43:55 -04:00
ember_include.js.erb
ember_jquery.js
ember-shim.js DEV: Deprecate ember module imports (#9011) 2020-02-21 15:56:49 +01:00
env.js
google-tag-manager.js.es6 Support for transpiling .js files (#9160) 2020-03-11 09:43:55 -04:00
google-universal-analytics.js.es6 Support for transpiling .js files (#9160) 2020-03-11 09:43:55 -04:00
main_include_admin.js
markdown-it-bundle.js REFACTOR: Attach resize controls to images from the markdown pipeline (#8314) 2019-11-12 17:32:37 -03:00
onpopstate-handler.js.es6 Support for transpiling .js files (#9160) 2020-03-11 09:43:55 -04:00
polyfills.js FIX: moves back padStart/padEnd to core polyfills (#8714) 2020-01-14 10:54:39 +01:00
preload-application-data.js.es6 Support for transpiling .js files (#9160) 2020-03-11 09:43:55 -04:00
preload-store.js.es6 FIX: More Promise uses that were not imported 2019-11-19 15:58:40 -05:00
pretty-text-bundle.js DEV: Remove pretty_text import hack & still work server-side (#8266) 2019-10-31 11:54:46 -05:00
print-page.js
service-worker.js.erb DEV: Bump uglifyjs (#7834) 2019-10-09 10:02:49 -03:00
set-prototype-polyfill.js
template_include.js DEV: Remove unsafe-eval from development CSP (#8569) 2019-12-30 12:17:12 +00:00
template_include.js.erb DEV: Remove unsafe-eval from development CSP (#8569) 2019-12-30 12:17:12 +00:00
vendor.js DEV: Remove unused BreakString class (#8942) 2020-02-14 15:32:59 -03:00
wizard-application.js DEV: Move computed to discourseComputed (#8312) 2019-11-07 15:38:28 -06:00
wizard-start.js.es6 Support for transpiling .js files (#9160) 2020-03-11 09:43:55 -04:00
wizard-vendor.js FIX: ensure s2 is working with wizard (#8886) 2020-02-07 10:00:39 +01:00