You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mastodon/app
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.
7 years ago
..
chewy Full-text search for authorized statuses (#6423) 7 years ago
controllers Add preference to hide following/followers lists (#7532) 7 years ago
helpers Fix double-encoding of display name in title and e-mails (#7534) 7 years ago
javascript Improve payload format of Web Push API now that it's open (#7521) 7 years ago
lib Resolve unknown status from Add activity, skip Remove if unknown (#7526) 7 years ago
mailers Account archive download (#6460) 7 years ago
models Improve payload format of Web Push API now that it's open (#7521) 7 years ago
policies Fix n+1 queries in StatusThreadingConcern (#7321) 7 years ago
presenters Better pagination for ActivityPub outbox (#7356) 7 years ago
serializers Improve payload format of Web Push API now that it's open (#7521) 7 years ago
services Raise Mastodon::RaceConditionError if Redis lock failed (#7511) 7 years ago
validators Implement the ability for instances to define a list of disallowed hashtags (#7176) 7 years ago
views Add preference to hide following/followers lists (#7532) 7 years ago
workers Do not raise delivery failure on 4xx errors, increase stoplight threshold (#7541) 7 years ago