[Glitch] Fix error when deleting a status

Port 7d12522ed7 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
main
Renaud Chaput 2024-06-21 00:39:06 +02:00 committed by Claire
parent 6300273664
commit 2f994bb34a
2 changed files with 3 additions and 3 deletions

View File

@ -74,10 +74,10 @@ export function updateTimeline(timeline, status, accept) {
export function deleteFromTimelines(id) {
return (dispatch, getState) => {
const accountId = getState().getIn(['statuses', id, 'account']);
const references = getState().get('statuses').filter(status => status.get('reblog') === id).map(status => status.get('id')).toJSON();
const references = getState().get('statuses').filter(status => status.get('reblog') === id).map(status => status.get('id')).valueSeq().toJSON();
const reblogOf = getState().getIn(['statuses', id, 'reblog'], null);
dispatch(timelineDelete(id, accountId, references, reblogOf));
dispatch(timelineDelete({ statusId: id, accountId, references, reblogOf }));
};
}

View File

@ -165,7 +165,7 @@ const filterTimelines = (state, relationship, statuses) => {
return;
}
references = statuses.filter(item => item.get('reblog') === status.get('id')).map(item => item.get('id'));
references = statuses.filter(item => item.get('reblog') === status.get('id')).map(item => item.get('id')).valueSeq().toJSON();
state = deleteStatus(state, status.get('id'), references, relationship.id);
});