diff options
| author | Shpuld Shpludson <shp@cock.li> | 2020-05-01 20:24:25 +0000 |
|---|---|---|
| committer | Shpuld Shpludson <shp@cock.li> | 2020-05-01 20:24:25 +0000 |
| commit | c67e9daf068c5a7eafaa7ce6a6418c8916a4f118 (patch) | |
| tree | 8b6d1b006c7d3e74a5e5b3515f1a55a99aaa4b21 /src/services/api/api.service.js | |
| parent | af3e69743e3192898f185fbc867defa1d155a4d4 (diff) | |
| parent | 01b07f01e9340935faf51e5a3c8034cc90423989 (diff) | |
Merge branch 'follow-request-notification' into 'develop'
Add support for follow request notifications
Closes #823 and #822
See merge request pleroma/pleroma-fe!1093
Diffstat (limited to 'src/services/api/api.service.js')
| -rw-r--r-- | src/services/api/api.service.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/services/api/api.service.js b/src/services/api/api.service.js index 3c6b8f4e..3a58c38d 100644 --- a/src/services/api/api.service.js +++ b/src/services/api/api.service.js @@ -29,6 +29,7 @@ const MASTODON_LOGIN_URL = '/api/v1/accounts/verify_credentials' const MASTODON_REGISTRATION_URL = '/api/v1/accounts' const MASTODON_USER_FAVORITES_TIMELINE_URL = '/api/v1/favourites' const MASTODON_USER_NOTIFICATIONS_URL = '/api/v1/notifications' +const MASTODON_DISMISS_NOTIFICATION_URL = id => `/api/v1/notifications/${id}/dismiss` const MASTODON_FAVORITE_URL = id => `/api/v1/statuses/${id}/favourite` const MASTODON_UNFAVORITE_URL = id => `/api/v1/statuses/${id}/unfavourite` const MASTODON_RETWEET_URL = id => `/api/v1/statuses/${id}/reblog` @@ -1006,6 +1007,15 @@ const unmuteDomain = ({ domain, credentials }) => { }) } +const dismissNotification = ({ credentials, id }) => { + return promisedRequest({ + url: MASTODON_DISMISS_NOTIFICATION_URL(id), + method: 'POST', + payload: { id }, + credentials + }) +} + export const getMastodonSocketURI = ({ credentials, stream, args = {} }) => { return Object.entries({ ...(credentials @@ -1161,6 +1171,7 @@ const apiService = { denyUser, suggestions, markNotificationsAsSeen, + dismissNotification, vote, fetchPoll, fetchFavoritedByUsers, |
