@ -11,6 +11,7 @@ import {
unmuteAccount ,
unmuteAccount ,
} from '../../../actions/accounts' ;
} from '../../../actions/accounts' ;
import { mentionCompose } from '../../../actions/compose' ;
import { mentionCompose } from '../../../actions/compose' ;
import { initMuteModal } from '../../../actions/mutes' ;
import { initReport } from '../../../actions/reports' ;
import { initReport } from '../../../actions/reports' ;
import { openModal } from '../../../actions/modal' ;
import { openModal } from '../../../actions/modal' ;
import { blockDomain , unblockDomain } from '../../../actions/domain_blocks' ;
import { blockDomain , unblockDomain } from '../../../actions/domain_blocks' ;
@ -19,7 +20,6 @@ import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
const messages = defineMessages ( {
const messages = defineMessages ( {
unfollowConfirm : { id : 'confirmations.unfollow.confirm' , defaultMessage : 'Unfollow' } ,
unfollowConfirm : { id : 'confirmations.unfollow.confirm' , defaultMessage : 'Unfollow' } ,
blockConfirm : { id : 'confirmations.block.confirm' , defaultMessage : 'Block' } ,
blockConfirm : { id : 'confirmations.block.confirm' , defaultMessage : 'Block' } ,
muteConfirm : { id : 'confirmations.mute.confirm' , defaultMessage : 'Mute' } ,
blockDomainConfirm : { id : 'confirmations.domain_block.confirm' , defaultMessage : 'Hide entire domain' } ,
blockDomainConfirm : { id : 'confirmations.domain_block.confirm' , defaultMessage : 'Hide entire domain' } ,
} ) ;
} ) ;
@ -77,11 +77,7 @@ const mapDispatchToProps = (dispatch, { intl }) => ({
if ( account . getIn ( [ 'relationship' , 'muting' ] ) ) {
if ( account . getIn ( [ 'relationship' , 'muting' ] ) ) {
dispatch ( unmuteAccount ( account . get ( 'id' ) ) ) ;
dispatch ( unmuteAccount ( account . get ( 'id' ) ) ) ;
} else {
} else {
dispatch ( openModal ( 'CONFIRM' , {
dispatch ( initMuteModal ( account ) ) ;
message : < FormattedMessage id = 'confirmations.mute.message' defaultMessage = 'Are you sure you want to mute {name}?' values = { { name : < strong > @ { account . get ( 'acct' ) } < /strong> }} / > ,
confirm : intl . formatMessage ( messages . muteConfirm ) ,
onConfirm : ( ) => dispatch ( muteAccount ( account . get ( 'id' ) ) ) ,
} ) ) ;
}
}
} ,
} ,