Federated reports (#6570)
* Fix #2176: Federated reports * UI for federated reports * Add spec for ActivityPub Flag handler * Add spec for ReportService
This commit is contained in:
parent
4072b68686
commit
41a01bec23
13 changed files with 307 additions and 23 deletions
|
@ -6,6 +6,7 @@ import {
|
|||
REPORT_CANCEL,
|
||||
REPORT_STATUS_TOGGLE,
|
||||
REPORT_COMMENT_CHANGE,
|
||||
REPORT_FORWARD_CHANGE,
|
||||
} from '../actions/reports';
|
||||
import { Map as ImmutableMap, Set as ImmutableSet } from 'immutable';
|
||||
|
||||
|
@ -15,6 +16,7 @@ const initialState = ImmutableMap({
|
|||
account_id: null,
|
||||
status_ids: ImmutableSet(),
|
||||
comment: '',
|
||||
forward: false,
|
||||
}),
|
||||
});
|
||||
|
||||
|
@ -42,6 +44,8 @@ export default function reports(state = initialState, action) {
|
|||
});
|
||||
case REPORT_COMMENT_CHANGE:
|
||||
return state.setIn(['new', 'comment'], action.comment);
|
||||
case REPORT_FORWARD_CHANGE:
|
||||
return state.setIn(['new', 'forward'], action.forward);
|
||||
case REPORT_SUBMIT_REQUEST:
|
||||
return state.setIn(['new', 'isSubmitting'], true);
|
||||
case REPORT_SUBMIT_FAIL:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue