about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/features/ui
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2022-02-23 21:05:46 +0100
committerClaire <claire.github-309c@sitedethib.com>2022-02-23 21:12:03 +0100
commitaafe91259a99c9333f2e597eb629bc3df2d585fc (patch)
tree4b686b9f1f63e7fc37d492582a39cdae300ef8cf /app/javascript/flavours/glitch/features/ui
parent470c0a80025f5d52bd66c16d1bfbccb1bfcaf6b0 (diff)
Fetch relationships when opening report modal
Relationship with the reported account affect which actions are proposed in
the “thanks” part. Upstream fetches relationships when opening dropdown menus,
but we don't.
Diffstat (limited to 'app/javascript/flavours/glitch/features/ui')
-rw-r--r--app/javascript/flavours/glitch/features/ui/components/report_modal.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/javascript/flavours/glitch/features/ui/components/report_modal.js b/app/javascript/flavours/glitch/features/ui/components/report_modal.js
index 3e6d77b5d..dcbe94929 100644
--- a/app/javascript/flavours/glitch/features/ui/components/report_modal.js
+++ b/app/javascript/flavours/glitch/features/ui/components/report_modal.js
@@ -3,6 +3,7 @@ import { connect } from 'react-redux';
 import { submitReport } from 'flavours/glitch/actions/reports';
 import { expandAccountTimeline } from 'flavours/glitch/actions/timelines';
 import { fetchRules } from 'flavours/glitch/actions/rules';
+import { fetchRelationships } from 'flavours/glitch/actions/accounts';
 import PropTypes from 'prop-types';
 import ImmutablePropTypes from 'react-immutable-proptypes';
 import { makeGetAccount } from 'flavours/glitch/selectors';
@@ -116,6 +117,7 @@ class ReportModal extends ImmutablePureComponent {
   componentDidMount () {
     const { dispatch, accountId } = this.props;
 
+    dispatch(fetchRelationships([accountId]));
     dispatch(expandAccountTimeline(accountId, { withReplies: true }));
     dispatch(fetchRules());
   }