[Glitch] Feature: Direct message from menu

Port d1f34151ae to glitch-soc
This commit is contained in:
Thibaut Girka
2018-03-29 21:13:47 +02:00
parent 939ea456d2
commit a5fac975f3
7 changed files with 93 additions and 1 deletions

View File

@ -9,7 +9,10 @@ import {
unblockAccount,
unmuteAccount,
} from 'flavours/glitch/actions/accounts';
import { mentionCompose } from 'flavours/glitch/actions/compose';
import {
mentionCompose,
directCompose
} from 'flavours/glitch/actions/compose';
import { initMuteModal } from 'flavours/glitch/actions/mutes';
import { initReport } from 'flavours/glitch/actions/reports';
import { openModal } from 'flavours/glitch/actions/modal';
@ -67,6 +70,14 @@ const mapDispatchToProps = (dispatch, { intl }) => ({
dispatch(mentionCompose(account, router));
},
onDirect (account, router) {
dispatch(directCompose(account, router));
},
onDirect (account, router) {
dispatch(directCompose(account, router));
},
onReblogToggle (account) {
if (account.getIn(['relationship', 'showing_reblogs'])) {
dispatch(followAccount(account.get('id'), false));