Fix error when deleting a status (#30784)

pull/2751/head
Renaud Chaput 2024-06-21 00:39:06 +02:00 committed by GitHub
parent bb2d77b4a0
commit 7d12522ed7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -63,10 +63,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

@ -159,7 +159,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);
});