about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/containers/status_container.js
diff options
context:
space:
mode:
authorReverite <github@reverite.sh>2019-03-30 23:42:55 -0700
committerReverite <github@reverite.sh>2019-03-30 23:42:55 -0700
commit4d77314005483e53e320a82c87805c6bcca1c463 (patch)
tree99f5b05bcbb1e8278517bf9a8f9ab114ab2dec45 /app/javascript/flavours/glitch/containers/status_container.js
parente356a902d23a0ed87c62717085a37d34550c8464 (diff)
parent925830d11bb5c132e282f82bdb2ca893d87c9c24 (diff)
Merge branch 'glitch' into production
Diffstat (limited to 'app/javascript/flavours/glitch/containers/status_container.js')
-rw-r--r--app/javascript/flavours/glitch/containers/status_container.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/containers/status_container.js b/app/javascript/flavours/glitch/containers/status_container.js
index f783878b0..60636feb4 100644
--- a/app/javascript/flavours/glitch/containers/status_container.js
+++ b/app/javascript/flavours/glitch/containers/status_container.js
@@ -35,6 +35,7 @@ const messages = defineMessages({
   blockConfirm: { id: 'confirmations.block.confirm', defaultMessage: 'Block' },
   replyConfirm: { id: 'confirmations.reply.confirm', defaultMessage: 'Reply' },
   replyMessage: { id: 'confirmations.reply.message', defaultMessage: 'Replying now will overwrite the message you are currently composing. Are you sure you want to proceed?' },
+  blockAndReport: { id: 'confirmations.block.block_and_report', defaultMessage: 'Block & Report' },
 });
 
 const makeMapStateToProps = () => {
@@ -169,11 +170,17 @@ const mapDispatchToProps = (dispatch, { intl }) => ({
     dispatch(openModal('VIDEO', { media, time }));
   },
 
-  onBlock (account) {
+  onBlock (status) {
+    const account = status.get('account');
     dispatch(openModal('CONFIRM', {
       message: <FormattedMessage id='confirmations.block.message' defaultMessage='Are you sure you want to block {name}?' values={{ name: <strong>@{account.get('acct')}</strong> }} />,
       confirm: intl.formatMessage(messages.blockConfirm),
       onConfirm: () => dispatch(blockAccount(account.get('id'))),
+      secondary: intl.formatMessage(messages.blockAndReport),
+      onSecondary: () => {
+        dispatch(blockAccount(account.get('id')));
+        dispatch(initReport(account, status));
+      },
     }));
   },