commit: 86696167b78b4f171ae60973e4a59e8ee59419b2
parent: aed0943678ffb96df0c281a7edbba63aaa6578e8
Author: HJ <30-hj@users.noreply.git.pleroma.social>
Date: Wed, 27 Mar 2019 20:44:58 +0000
Merge branch 'issue-457-mastodon-tag-timeline' into 'develop'
#457 - update tag timeline endpoint to MastoAPI
Closes #457
See merge request pleroma/pleroma-fe!707
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/services/api/api.service.js b/src/services/api/api.service.js
@@ -1,7 +1,6 @@
/* eslint-env browser */
const LOGIN_URL = '/api/account/verify_credentials.json'
const ALL_FOLLOWING_URL = '/api/qvitter/allfollowing'
-const TAG_TIMELINE_URL = '/api/statusnet/tags/timeline'
const MENTIONS_URL = '/api/statuses/mentions.json'
const REGISTRATION_URL = '/api/account/register.json'
const AVATAR_UPDATE_URL = '/api/qvitter/update_avatar.json'
@@ -37,6 +36,7 @@ const MASTODON_STATUS_CONTEXT_URL = id => `/api/v1/statuses/${id}/context`
const MASTODON_USER_URL = '/api/v1/accounts'
const MASTODON_USER_RELATIONSHIPS_URL = '/api/v1/accounts/relationships'
const MASTODON_USER_TIMELINE_URL = id => `/api/v1/accounts/${id}/statuses`
+const MASTODON_TAG_TIMELINE_URL = tag => `/api/v1/timelines/tag/${tag}`
const MASTODON_USER_BLOCKS_URL = '/api/v1/blocks/'
const MASTODON_USER_MUTES_URL = '/api/v1/mutes/'
const MASTODON_BLOCK_USER_URL = id => `/api/v1/accounts/${id}/block`
@@ -363,7 +363,7 @@ const fetchTimeline = ({timeline, credentials, since = false, until = false, use
user: MASTODON_USER_TIMELINE_URL,
media: MASTODON_USER_TIMELINE_URL,
favorites: MASTODON_USER_FAVORITES_TIMELINE_URL,
- tag: TAG_TIMELINE_URL
+ tag: MASTODON_TAG_TIMELINE_URL
}
const isNotifications = timeline === 'notifications'
const params = []
@@ -381,7 +381,7 @@ const fetchTimeline = ({timeline, credentials, since = false, until = false, use
params.push(['max_id', until])
}
if (tag) {
- url += `/${tag}.json`
+ url = url(tag)
}
if (timeline === 'media') {
params.push(['only_media', 1])