From 7d12522ed71193decc2a9aeacc8cf921b09d3654 Mon Sep 17 00:00:00 2001 From: Renaud Chaput Date: Fri, 21 Jun 2024 00:39:06 +0200 Subject: [PATCH] Fix error when deleting a status (#30784) --- app/javascript/mastodon/actions/timelines.js | 4 ++-- app/javascript/mastodon/reducers/timelines.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/javascript/mastodon/actions/timelines.js b/app/javascript/mastodon/actions/timelines.js index d1851551b1..4ca3c3a151 100644 --- a/app/javascript/mastodon/actions/timelines.js +++ b/app/javascript/mastodon/actions/timelines.js @@ -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 })); }; } diff --git a/app/javascript/mastodon/reducers/timelines.js b/app/javascript/mastodon/reducers/timelines.js index 786d20b307..b07281ab87 100644 --- a/app/javascript/mastodon/reducers/timelines.js +++ b/app/javascript/mastodon/reducers/timelines.js @@ -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); });