aboutsummaryrefslogtreecommitdiff
path: root/src/services
diff options
context:
space:
mode:
authorShpuld Shpludson <shp@cock.li>2020-07-02 04:50:03 +0000
committerShpuld Shpludson <shp@cock.li>2020-07-02 04:50:03 +0000
commitc0fb35b10628df0e0b84838a5adfd77840f40b41 (patch)
treee463425072e0664e604bff2adc3cb36030465fc6 /src/services
parent0ca3a6e63d6dd8ed59cdf0c14780b5616667accc (diff)
parentbeb160bd537abcb7f2e147c7954886d2f51d385f (diff)
Merge branch 'develop' into 'xenofem/pleroma-fe-rebased-image-description-authoring'
# Conflicts: # CHANGELOG.md
Diffstat (limited to 'src/services')
-rw-r--r--src/services/api/api.service.js6
-rw-r--r--src/services/timeline_fetcher/timeline_fetcher.service.js4
2 files changed, 8 insertions, 2 deletions
diff --git a/src/services/api/api.service.js b/src/services/api/api.service.js
index cb205e3f..093c2013 100644
--- a/src/services/api/api.service.js
+++ b/src/services/api/api.service.js
@@ -498,7 +498,8 @@ const fetchTimeline = ({
until = false,
userId = false,
tag = false,
- withMuted = false
+ withMuted = false,
+ replyVisibility = 'all'
}) => {
const timelineUrls = {
public: MASTODON_PUBLIC_TIMELINE,
@@ -541,6 +542,9 @@ const fetchTimeline = ({
if (timeline !== 'favorites') {
params.push(['with_muted', withMuted])
}
+ if (replyVisibility !== 'all') {
+ params.push(['reply_visibility', replyVisibility])
+ }
params.push(['limit', 20])
diff --git a/src/services/timeline_fetcher/timeline_fetcher.service.js b/src/services/timeline_fetcher/timeline_fetcher.service.js
index c6b28ad5..30fb26bd 100644
--- a/src/services/timeline_fetcher/timeline_fetcher.service.js
+++ b/src/services/timeline_fetcher/timeline_fetcher.service.js
@@ -30,7 +30,8 @@ const fetchAndUpdate = ({
const rootState = store.rootState || store.state
const { getters } = store
const timelineData = rootState.statuses.timelines[camelCase(timeline)]
- const hideMutedPosts = getters.mergedConfig.hideMutedPosts
+ const { hideMutedPosts, replyVisibility } = getters.mergedConfig
+ const loggedIn = !!rootState.users.currentUser
if (older) {
args['until'] = until || timelineData.minId
@@ -41,6 +42,7 @@ const fetchAndUpdate = ({
args['userId'] = userId
args['tag'] = tag
args['withMuted'] = !hideMutedPosts
+ if (loggedIn) args['replyVisibility'] = replyVisibility
const numStatusesBeforeFetch = timelineData.statuses.length