diff options
author | ThibG <thib@sitedethib.com> | 2020-07-07 19:58:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-07 19:58:12 +0200 |
commit | 4acb7efb4ba43ec7706e4d8edfe30097b541c909 (patch) | |
tree | f07405be0aa8f31fcb5abb885b6a1eeaafaba8fd /app/javascript/flavours/glitch/actions/timelines.js | |
parent | 64b6c20676f320686c58e321b674cba757e40905 (diff) | |
parent | 13db302f6eca9e3a40eb92fe9dc358e4a5dda432 (diff) |
Merge pull request #1372 from ThibG/glitch-soc/fixes/local-only-public-option
Add option to show local-only toots in public timeline
Diffstat (limited to 'app/javascript/flavours/glitch/actions/timelines.js')
-rw-r--r-- | app/javascript/flavours/glitch/actions/timelines.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/actions/timelines.js b/app/javascript/flavours/glitch/actions/timelines.js index 9a7f62a08..b19666e62 100644 --- a/app/javascript/flavours/glitch/actions/timelines.js +++ b/app/javascript/flavours/glitch/actions/timelines.js @@ -130,7 +130,7 @@ export function expandTimeline(timelineId, path, params = {}, done = noOp) { }; export const expandHomeTimeline = ({ maxId } = {}, done = noOp) => expandTimeline('home', '/api/v1/timelines/home', { max_id: maxId }, done); -export const expandPublicTimeline = ({ maxId, onlyMedia, onlyRemote } = {}, done = noOp) => expandTimeline(`public${onlyRemote ? ':remote' : ''}${onlyMedia ? ':media' : ''}`, '/api/v1/timelines/public', { remote: !!onlyRemote, max_id: maxId, only_media: !!onlyMedia }, done); +export const expandPublicTimeline = ({ maxId, onlyMedia, onlyRemote, allowLocalOnly } = {}, done = noOp) => expandTimeline(`public${onlyRemote ? ':remote' : (allowLocalOnly ? ':allow_local_only' : '')}${onlyMedia ? ':media' : ''}`, '/api/v1/timelines/public', { remote: !!onlyRemote, allow_local_only: !!allowLocalOnly, max_id: maxId, only_media: !!onlyMedia }, done); export const expandCommunityTimeline = ({ maxId, onlyMedia } = {}, done = noOp) => expandTimeline(`community${onlyMedia ? ':media' : ''}`, '/api/v1/timelines/public', { local: true, max_id: maxId, only_media: !!onlyMedia }, done); export const expandDirectTimeline = ({ maxId } = {}, done = noOp) => expandTimeline('direct', '/api/v1/timelines/direct', { max_id: maxId }, done); export const expandAccountTimeline = (accountId, { maxId, withReplies } = {}) => expandTimeline(`account:${accountId}${withReplies ? ':with_replies' : ''}`, `/api/v1/accounts/${accountId}/statuses`, { exclude_replies: !withReplies, max_id: maxId }); |