about summary refs log tree commit diff
path: root/app/javascript/mastodon/service_worker
AgeCommit message (Collapse)Author
2020-03-08Code style improvements in JavaScript (#13159)Bèr Kessels
* JS-linter: fix trailing comma's * Configure eslinter to ignore this onchange error.
2019-12-01Add follow_request notification type (#12198)ThibG
* Add follow_request notification type The notification type already existed in the backend but was never pushed to the front-end. This also means translation strings were also available for the backend, from the notification mailer. Unlike other notification types, these are off by default, to match what I remember of Gargron's view on the topic: that follow requests should not clutter notifications and should instead be reviewed at the user's own leisure in the dedicated column. Since follow requests have their own column, I've deemed it unnecessary to add a specific tab for them in the notification quick filter. * Show follow request link in single-column if there are pending requests, even if account isn't locked * Push follow requests from notifications to the follow_requests list * Offer to accept or reject follow request from the notification * Redesign follow request notification
2019-03-11Support pushing and receiving updates to poll tallies (#10209)ThibG
* Process incoming poll tallies update * Send Update on poll vote * Do not send Updates for a poll more often than once every 3 minutes * Include voters in people to notify of results update * Schedule closing poll worker on poll creation * Add new notification type for ending polls * Add front-end support for ended poll notifications * Fix UpdatePollSerializer * Fix Updates not being triggered by local votes * Fix tests failure * Fix web push notifications for closing polls * Minor cleanup * Notify voters of both remote and local polls when those close * Fix delivery of poll updates to mentioned accounts and voters
2019-01-11Hide CWed content in notifications and fix sensitive images without CWs (#9778)ThibG
Fixes #9634
2018-09-24Fix a problem about generating an url of notifications (#8758)Genbu Hase
2018-08-23Only display web push notifications after API call (fixes #7902) (#8396)ThibG
* Only display web push notifications after API call (fixes #7902) * Decode then truncate instead of truncating then decoding in webpush serializer
2018-07-03Disable service worker media cache and IndexedDB storage (#7932)Eugen Rochko
Fix #7893 Fix #7615
2018-06-20Return collect response when fail put cache to storage (#7863)Hinaloe
* return collect response when fail put cache to storage * cleanup callback
2018-06-01Update ESLint for Code Climate (#7696)Yamagishi Kazutoshi
* Update babel-eslint to version 8.2.3 * Update eslint to version 4.19.1 * Update eslint-plugin-promise to version 3.8.0 * Update eslint-plugin-react to version 7.8.2 * Upgrade eslint-plugin-jsx-a11y to version 6.0.3 * yarn test:lint --fix
2018-05-29Cache attachments on external host with service worker (#7493)Akihiko Odaki
2018-05-27Don't use Object.assign with Notification, only display actions for mentions ↵Eugen Rochko
(#7632) Fix #7627
2018-05-21Unescape HTML entities in rich web push notifications in web UI (#7569)Eugen Rochko
2018-05-21Convert rich push notifications to plaintext in webapp (#7563)Eugen Rochko
* Convert rich push notifications to plaintext in webapp * Fix code style issues
2018-05-19Cache media only when storage can be freed (#7547)Akihiko Odaki
2018-05-19Improve payload format of Web Push API now that it's open (#7521)Eugen Rochko
> Good lord what is happening in there Previously the contents of the Web Push API payloads closely resembled the structure of JavaScript's [Notification](https://developer.mozilla.org/en-US/docs/Web/API/Notification). But now that the API is open to non-browser apps, and given that there is no required coupling between contents of the payload and a Notification object, here is how I changed the payload: ```json { "access_token": "...", "preferred_locale": "en", "notification_id": "12345", "notification_type": "follow", "title": "So and so followed you", "body": "This is my bio", "icon": "https://example.com/avatar.png" } ``` The title, body and icon attributes are included as a fallback so you can construct a minimal notification if you cannot perform a network request to the API to get more data.
2018-05-16Let navigator follow redirect instead that handling redirect in fetch (#7500)Akihiko Odaki
* Let navigator follow redirect instead that handling redirect in fetch * Do not use cache when fetched resource is to redirect
2018-05-15Consider only-if-cached in FetchEvent valid on non-Mozilla-Firefox browser ↵Akihiko Odaki
(#7506)
2018-05-15Ignore only-if-cached cache mode on Mozilla Firefox prior to version 60 (#7503)Akihiko Odaki
2018-05-15Clone response before using when caching web page (#7498)Akihiko Odaki
2018-05-14Disallow async function in service worker (#7482)Akihiko Odaki
offline-plugin depends on webpack.optimize.UglifyJsPlugin, which is an alias of uglifyjs-webpack-plugin v0.4.6. uglifyjs-webpack-plugin v0.4.6 uses uglify-js 2.8.29, which is not compatible with async function.
2018-04-08Free stroage if it is exceeding disk quota (#7061)Akihiko Odaki
2018-03-27Clone response before put it to the cache (#6932)unarist
`Response.prototype.clone()` must be called before the response used. This fixes an error from ServiceWorker and failing to load image when the image is not cached.
2018-03-27Cache media (#6902)Akihiko Odaki
2018-03-18Synchronize HTML page cache with sessions (#6815)Akihiko Odaki
2018-03-17Cache HTML page with Service Worker (#6802)Akihiko Odaki
This is the first step to make Mastodon work offline. It is also required by Chromium to trigger Web Manifest automated install prompt.
2017-09-01Refactor Web::PushSubscription, remove welcome message (#4524)Eugen Rochko
* Refactor Web::PushSubscription, remove welcome message * Add missing helper * Use locale of the receiver on push notifications (#4519) * Remove unused translations * Fix dir on notifications
2017-08-01fix(web_push_notifications): Send message with welcome notifications (#4471)Sorin Davidoi
* fix(web_push_notifications): Send grouping title in welcome notification * fix(web_push_notifications): Read message from last notification
2017-07-28feat(web_push_notifications): Group notifications (#4388)Sorin Davidoi
2017-07-28fix(web_push_notification): Do not hard reload tab (#4380)Sorin Davidoi
* fix(web_push_notification): Do not hard reload tab * fix(web_push_notification_worker): Guard against null subscription * refactor: Incorporate pull request feedback
2017-07-18feat(push-notifications): Open link in current tab if possible (#4228)Sorin Davidoi
* fix(push-notification): Open link in current tab if possible * feat(sw): Skip waiting and claim clients
2017-07-13Web Push Notifications (#3243)Sorin Davidoi
* feat: Register push subscription * feat: Notify when mentioned * feat: Boost, favourite, reply, follow, follow request * feat: Notification interaction * feat: Handle change of public key * feat: Unsubscribe if things go wrong * feat: Do not send normal notifications if push is enabled * feat: Focus client if open * refactor: Move push logic to WebPushSubscription * feat: Better title and body * feat: Localize messages * chore: Fix lint errors * feat: Settings * refactor: Lazy load * fix: Check if push settings exist * feat: Device-based preferences * refactor: Simplify logic * refactor: Pull request feedback * refactor: Pull request feedback * refactor: Create /api/web/push_subscriptions endpoint * feat: Spec PushSubscriptionController * refactor: WebPushSubscription => Web::PushSubscription * feat: Spec Web::PushSubscription * feat: Display first media attachment * feat: Support direction * fix: Stuff broken while rebasing * refactor: Integration with session activations * refactor: Cleanup * refactor: Simplify implementation * feat: Set VAPID keys via environment * chore: Comments * fix: Crash when no alerts * fix: Set VAPID keys in testing environment * fix: Follow link * feat: Notification actions * fix: Delete previous subscription * chore: Temporary logs * refactor: Move migration to a later date * fix: Fetch the correct session activation and misc bugs * refactor: Move migration to a later date * fix: Remove follow request (no notifications) * feat: Send administrator contact to push service * feat: Set time-to-live * fix: Do not show sensitive images * fix: Reducer crash in error handling * feat: Add badge * chore: Fix lint error * fix: Checkbox label overlap * fix: Check for payload support * fix: Rename action "type" (crash in latest Chrome) * feat: Action to expand notification * fix: Lint errors * fix: Unescape notification body * fix: Do not allow boosting if the status is hidden * feat: Add VAPID keys to the production sample environment * fix: Strip HTML tags from status * refactor: Better error messages * refactor: Handle browser not implementing the VAPID protocol (Samsung Internet) * fix: Error when target_status is nil * fix: Handle lack of image * fix: Delete reference to invalid subscriptions * feat: Better error handling * fix: Unescape HTML characters after tags are striped * refactor: Simpify code * fix: Modify to work with #4091 * Sort strings alphabetically * i18n: Updated Polish translation it annoys me that it's not fully localized :P * refactor: Use current_session in PushSubscriptionController * fix: Rebase mistake * fix: Set cacheName to mastodon * refactor: Pull request feedback * refactor: Remove logging statements * chore(yarn): Fix conflicts with master * chore(yarn): Copy latest from master * chore(yarn): Readd offline-plugin * refactor: Use save! and update! * refactor: Send notifications async * fix: Allow retry when push fails * fix: Save track for failed pushes * fix: Minify sw.js * fix: Remove account_id from fabricator