[Glitch] Add notifications for new reports

Port 2936f42a14 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
Eugen Rochko
2022-06-27 09:30:15 +02:00
committed by Claire
parent f218e633b4
commit 485b43ed7e
12 changed files with 279 additions and 11 deletions

View File

@@ -31,7 +31,7 @@ import {
} from 'flavours/glitch/actions/markers';
import { DOMAIN_BLOCK_SUCCESS } from 'flavours/glitch/actions/domain_blocks';
import { TIMELINE_DELETE, TIMELINE_DISCONNECT } from 'flavours/glitch/actions/timelines';
import { Map as ImmutableMap, List as ImmutableList } from 'immutable';
import { fromJS, Map as ImmutableMap, List as ImmutableList } from 'immutable';
import compareId from 'flavours/glitch/util/compare_id';
const initialState = ImmutableMap({
@@ -58,6 +58,7 @@ const notificationToMap = (state, notification) => ImmutableMap({
account: notification.account.id,
markedForDelete: state.get('markNewForDelete'),
status: notification.status ? notification.status.id : null,
report: notification.report ? fromJS(notification.report) : null,
});
const normalizeNotification = (state, notification, usePendingItems) => {