bastodon/app/javascript/mastodon/actions
Eugen Rochko 4b94e9c65e
Improve payload format of Web Push API now that it's open (#7521)
> 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-19 14:46:47 +02:00
..
importer Use plaintext value for field value tooltips in web UI (#7388) 2018-05-07 09:30:38 +02:00
push_notifications Do not override the default push notification settings (#6037) 2018-05-19 14:45:58 +02:00
accounts.js Free stroage if it is exceeding disk quota (#7061) 2018-04-08 13:32:39 +02:00
alerts.js Add missing rejection handling for Promises (#7008) 2018-04-02 14:51:02 +02:00
blocks.js Store objects to IndexedDB (#6826) 2018-03-24 13:06:27 +01:00
bundles.js
cards.js
columns.js
compose.js Refactor resizeImage method (#7236) 2018-04-23 09:15:51 +02:00
custom_emojis.js retrieve custom emoji list via API instead of before page load (#7047) 2018-04-04 22:25:34 +02:00
domain_blocks.js Add some UI for user-defined domain blocks (#6628) 2018-03-30 12:38:00 +02:00
dropdown_menu.js Remove pointer events on the entire UI when a dropdown menu is open (#6648) 2018-03-07 02:26:43 +01:00
emojis.js Track frequently used emojis in web UI (#5275) 2017-10-08 21:47:15 +02:00
favourites.js Store objects to IndexedDB (#6826) 2018-03-24 13:06:27 +01:00
height_cache.js Fix height cache (#4909) 2017-09-13 10:24:33 +02:00
interactions.js Store objects to IndexedDB (#6826) 2018-03-24 13:06:27 +01:00
lists.js Add missing rejection handling for Promises (#7008) 2018-04-02 14:51:02 +02:00
modal.js
mutes.js Store objects to IndexedDB (#6826) 2018-03-24 13:06:27 +01:00
notifications.js Improve payload format of Web Push API now that it's open (#7521) 2018-05-19 14:46:47 +02:00
onboarding.js Restore onboarding modal (#6303) 2018-01-20 01:32:37 +01:00
pin_statuses.js Store objects to IndexedDB (#6826) 2018-03-24 13:06:27 +01:00
reports.js Federated reports (#6570) 2018-02-28 06:54:55 +01:00
search.js Store objects to IndexedDB (#6826) 2018-03-24 13:06:27 +01:00
settings.js Improve web api protect (#6343) 2018-04-17 15:23:46 +02:00
statuses.js Free stroage if it is exceeding disk quota (#7061) 2018-04-08 13:32:39 +02:00
store.js Store objects to IndexedDB (#6826) 2018-03-24 13:06:27 +01:00
streaming.js Use randomized setTimeout when fallback-polling and re-add since_id (#7522) 2018-05-18 02:32:35 +02:00
timelines.js Use randomized setTimeout when fallback-polling and re-add since_id (#7522) 2018-05-18 02:32:35 +02:00