Skip to content

Commit

Permalink
[Glitch] Fix error when deleting a status
Browse files Browse the repository at this point in the history
Port 7d12522 to glitch-soc

Signed-off-by: Claire <[email protected]>
  • Loading branch information
renchap authored and ClearlyClaire committed Jun 21, 2024
1 parent 6300273 commit 2f994bb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/javascript/flavours/glitch/actions/timelines.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 }));
};
}

Expand Down
2 changes: 1 addition & 1 deletion app/javascript/flavours/glitch/reducers/timelines.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});

Expand Down

0 comments on commit 2f994bb

Please sign in to comment.