From da389a664b87bb131435f2ccb904c0754d5d1655 Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Tue, 6 Aug 2019 13:55:54 -0500 Subject: added ability to link accounts with `account:link:token` + `account:link:add` & switch between them with `i:am`/`we:are` bangtags; remove links with `account:link:del:USERNAME` or `account:link:clear`; list links with `account:link:list` --- app/javascript/flavours/glitch/actions/streaming.js | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'app/javascript/flavours/glitch/actions') diff --git a/app/javascript/flavours/glitch/actions/streaming.js b/app/javascript/flavours/glitch/actions/streaming.js index b5dd70989..649fda8ca 100644 --- a/app/javascript/flavours/glitch/actions/streaming.js +++ b/app/javascript/flavours/glitch/actions/streaming.js @@ -9,6 +9,7 @@ import { import { updateNotifications, expandNotifications } from './notifications'; import { fetchFilters } from './filters'; import { getLocale } from 'mastodon/locales'; +import { resetCompose } from 'flavours/glitch/actions/compose'; const { messages } = getLocale(); @@ -40,6 +41,14 @@ export function connectTimelineStream (timelineId, path, pollingRefresh = null, case 'filters_changed': dispatch(fetchFilters()); break; + case 'switch_accounts': + dispatch(resetCompose()); + window.location.href = `/auth/sign_in?switch_to=${data.payload}` + break; + case 'refresh': + dispatch(resetCompose()); + window.location.reload(); + break; } }, }; -- cgit