diff options
Diffstat (limited to 'src/modules')
| -rw-r--r-- | src/modules/instance.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/modules/instance.js b/src/modules/instance.js index b1bc9779..3b15e62e 100644 --- a/src/modules/instance.js +++ b/src/modules/instance.js @@ -36,6 +36,8 @@ const REGIONAL_INDICATORS = (() => { return res })() +const REMOTE_INTERACTION_URL = '/main/ostatus' + const defaultState = { // Stuff from apiConfig name: 'Pleroma FE', @@ -214,6 +216,18 @@ const instance = { }, instanceDomain (state) { return new URL(state.server).hostname + }, + remoteInteractionLink (state) { + const server = state.server.endsWith('/') ? state.server.slice(0, -1) : state.server + const link = server + REMOTE_INTERACTION_URL + + return ({ statusId, nickname }) => { + if (statusId) { + return `${link}?status_id=${statusId}` + } else { + return `${link}?nickname=${nickname}` + } + } } }, actions: { |
