diff options
author | Thibaut Girka <thib@sitedethib.com> | 2018-03-29 21:13:47 +0200 |
---|---|---|
committer | Thibaut Girka <thib@sitedethib.com> | 2018-05-16 19:45:30 +0200 |
commit | a5fac975f3951e954f8a1685150e716250a16a78 (patch) | |
tree | 2bc233c46141736b6e722dbd80c8aaee2ca1e03a /app/javascript/flavours/glitch/reducers | |
parent | 939ea456d28072592e44809636919fb03e967001 (diff) |
[Glitch] Feature: Direct message from menu
Port d1f34151aee564bb1e60ee48107797681c869a81 to glitch-soc
Diffstat (limited to 'app/javascript/flavours/glitch/reducers')
-rw-r--r-- | app/javascript/flavours/glitch/reducers/compose.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/javascript/flavours/glitch/reducers/compose.js b/app/javascript/flavours/glitch/reducers/compose.js index 8973c7713..68c7e11f1 100644 --- a/app/javascript/flavours/glitch/reducers/compose.js +++ b/app/javascript/flavours/glitch/reducers/compose.js @@ -5,6 +5,7 @@ import { COMPOSE_CYCLE_ELEFRIEND, COMPOSE_REPLY, COMPOSE_REPLY_CANCEL, + COMPOSE_DIRECT, COMPOSE_MENTION, COMPOSE_SUBMIT_REQUEST, COMPOSE_SUBMIT_SUCCESS, @@ -325,6 +326,12 @@ export default function compose(state = initialState, action) { .update('text', text => `${text}@${action.account.get('acct')} `) .set('focusDate', new Date()) .set('idempotencyKey', uuid()); + case COMPOSE_DIRECT: + return state + .update('text', text => `${text}@${action.account.get('acct')} `) + .set('privacy', 'direct') + .set('focusDate', new Date()) + .set('idempotencyKey', uuid()); case COMPOSE_SUGGESTIONS_CLEAR: return state.update('suggestions', ImmutableList(), list => list.clear()).set('suggestion_token', null); case COMPOSE_SUGGESTIONS_READY: |