mastodon/config
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
..
environments
initializers User agent for WebFinger (#7531) 2018-05-18 01:47:22 +02:00
locales Improve payload format of Web Push API now that it's open (#7521) 2018-05-19 14:46:47 +02:00
webpack Limit environment variables to expose to webpack (#7480) 2018-05-14 17:45:37 +02:00
application.rb
boot.rb
brakeman.ignore
database.yml
deploy.rb Update dependencies for Ruby (2018-04-23) (#7237) 2018-04-23 11:29:17 +02:00
environment.rb
i18n-tasks.yml
navigation.rb
puma.rb Do not set port for puma if it is bound to unix socket (#2289) 2017-04-22 01:22:20 +02:00
routes.rb Add GET /api/v1/push/subscription REST API (#7471) 2018-05-13 21:07:31 +02:00
secrets.yml
settings.yml Add preference to hide following/followers lists (#7532) 2018-05-18 02:26:51 +02:00
sidekiq.yml
themes.yml
webpacker.yml