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
This commit is contained in:
HJ 2019-03-27 20:44:58 +00:00
commit 86696167b7
1 changed files with 3 additions and 3 deletions

View File

@ -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])