From 691f4e32102d7b04710c6e0015e3f02dff7b529f Mon Sep 17 00:00:00 2001 From: Claire Date: Fri, 5 Dec 2025 16:17:48 +0100 Subject: [PATCH] =?UTF-8?q?[Glitch]=20Fix=20=E2=80=9CDelete=20and=20Redraf?= =?UTF-8?q?t=E2=80=9D=20on=20a=20non-quote=20being=20treated=20as=20a=20qu?= =?UTF-8?q?ote=20post=20in=20some=20cases?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Port 1ae3b4672bffbc4aaf26f60c7063d6901239de5d to glitch-soc Signed-off-by: Claire --- app/javascript/flavours/glitch/reducers/compose.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/javascript/flavours/glitch/reducers/compose.js b/app/javascript/flavours/glitch/reducers/compose.js index f50a4da01c..4c7a127a3d 100644 --- a/app/javascript/flavours/glitch/reducers/compose.js +++ b/app/javascript/flavours/glitch/reducers/compose.js @@ -647,7 +647,7 @@ export const composeReducer = (state = initialState, action) => { map => map.merge(new ImmutableMap({ do_not_federate })), ); map.set('id', null); - map.set('quoted_status_id', action.status.getIn(['quote', 'quoted_status'])); + map.set('quoted_status_id', action.status.getIn(['quote', 'quoted_status'], null)); // Mastodon-authored posts can be expected to have at most one automatic approval policy map.set('quote_policy', action.status.getIn(['quote_approval', 'automatic', 0]) || 'nobody'); @@ -690,7 +690,7 @@ export const composeReducer = (state = initialState, action) => { map.set('idempotencyKey', uuid()); map.set('sensitive', action.status.get('sensitive')); map.set('language', action.status.get('language')); - map.set('quoted_status_id', action.status.getIn(['quote', 'quoted_status'])); + map.set('quoted_status_id', action.status.getIn(['quote', 'quoted_status'], null)); // Mastodon-authored posts can be expected to have at most one automatic approval policy map.set('quote_policy', action.status.getIn(['quote_approval', 'automatic', 0]) || 'nobody');