From f69f1e9429b7cd46640681101f8462c62ba3af10 Mon Sep 17 00:00:00 2001 From: Claire Date: Wed, 15 Nov 2023 21:52:19 +0100 Subject: [PATCH] Fix code discrepancies with upstream --- app/javascript/flavours/glitch/actions/interactions.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/javascript/flavours/glitch/actions/interactions.js b/app/javascript/flavours/glitch/actions/interactions.js index ebc7e8c50f..7d0144438a 100644 --- a/app/javascript/flavours/glitch/actions/interactions.js +++ b/app/javascript/flavours/glitch/actions/interactions.js @@ -211,7 +211,7 @@ export function bookmark(status) { api(getState).post(`/api/v1/statuses/${status.get('id')}/bookmark`).then(function (response) { dispatch(importFetchedStatus(response.data)); - dispatch(bookmarkSuccess(status)); + dispatch(bookmarkSuccess(status, response.data)); }).catch(function (error) { dispatch(bookmarkFail(status, error)); }); @@ -224,7 +224,7 @@ export function unbookmark(status) { api(getState).post(`/api/v1/statuses/${status.get('id')}/unbookmark`).then(response => { dispatch(importFetchedStatus(response.data)); - dispatch(unbookmarkSuccess(status)); + dispatch(unbookmarkSuccess(status, response.data)); }).catch(error => { dispatch(unbookmarkFail(status, error)); }); @@ -238,10 +238,11 @@ export function bookmarkRequest(status) { }; } -export function bookmarkSuccess(status) { +export function bookmarkSuccess(status, response) { return { type: BOOKMARK_SUCCESS, status: status, + response: response, }; } @@ -260,10 +261,11 @@ export function unbookmarkRequest(status) { }; } -export function unbookmarkSuccess(status) { +export function unbookmarkSuccess(status, response) { return { type: UNBOOKMARK_SUCCESS, status: status, + response: response, }; }