aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordave <starpumadev@gmail.com>2019-03-27 11:09:30 -0400
committerdave <starpumadev@gmail.com>2019-03-27 11:09:30 -0400
commit578b412177495af4376dbcbcbeac85bc6cb99432 (patch)
treecd7da3f0f0997587f05be946721a69917090ed58 /src
parent982be05873879f1ecea2fcdc9a8aa3e33fbb2524 (diff)
parente750b2f197b03ec78ad9a3544244bba906f319c4 (diff)
#457 - merge develop and resolve conflict
Diffstat (limited to 'src')
-rw-r--r--src/services/api/api.service.js13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/services/api/api.service.js b/src/services/api/api.service.js
index 384a11bc..df1308d5 100644
--- a/src/services/api/api.service.js
+++ b/src/services/api/api.service.js
@@ -2,8 +2,6 @@
const LOGIN_URL = '/api/account/verify_credentials.json'
const FRIENDS_TIMELINE_URL = '/api/statuses/friends_timeline.json'
const ALL_FOLLOWING_URL = '/api/qvitter/allfollowing'
-const PUBLIC_TIMELINE_URL = '/api/statuses/public_timeline.json'
-const PUBLIC_AND_EXTERNAL_TIMELINE_URL = '/api/statuses/public_and_external_timeline.json'
const FAVORITE_URL = '/api/favorites/create'
const UNFAVORITE_URL = '/api/favorites/destroy'
const RETWEET_URL = '/api/statuses/retweet'
@@ -32,6 +30,7 @@ const DENY_USER_URL = '/api/pleroma/friendships/deny'
const SUGGESTIONS_URL = '/api/v1/suggestions'
const MASTODON_USER_FAVORITES_TIMELINE_URL = '/api/v1/favourites'
+const MASTODON_PUBLIC_TIMELINE = '/api/v1/timelines/public'
const MASTODON_STATUS_URL = id => `/api/v1/statuses/${id}`
const MASTODON_STATUS_CONTEXT_URL = id => `/api/v1/statuses/${id}/context`
const MASTODON_USER_URL = '/api/v1/accounts'
@@ -347,12 +346,12 @@ const fetchStatus = ({id, credentials}) => {
const fetchTimeline = ({timeline, credentials, since = false, until = false, userId = false, tag = false, withMuted = false}) => {
const timelineUrls = {
- public: PUBLIC_TIMELINE_URL,
+ public: MASTODON_PUBLIC_TIMELINE,
friends: FRIENDS_TIMELINE_URL,
mentions: MENTIONS_URL,
dms: DM_TIMELINE_URL,
notifications: QVITTER_USER_NOTIFICATIONS_URL,
- 'publicAndExternal': PUBLIC_AND_EXTERNAL_TIMELINE_URL,
+ 'publicAndExternal': MASTODON_PUBLIC_TIMELINE,
user: MASTODON_USER_TIMELINE_URL,
media: MASTODON_USER_TIMELINE_URL,
favorites: MASTODON_USER_FAVORITES_TIMELINE_URL,
@@ -379,6 +378,12 @@ const fetchTimeline = ({timeline, credentials, since = false, until = false, use
if (timeline === 'media') {
params.push(['only_media', 1])
}
+ if (timeline === 'public') {
+ params.push(['local', true])
+ }
+ if (timeline === 'public' || timeline === 'publicAndExternal') {
+ params.push(['only_media', false])
+ }
params.push(['count', 20])
params.push(['with_muted', withMuted])