From ead0ca12ea9b1ba1f289ecc9b3b183692d398568 Mon Sep 17 00:00:00 2001 From: Tomasz Palys Date: Wed, 18 Sep 2024 19:22:46 +0200 Subject: [PATCH] [lib] Disable editing failed messages Summary: https://linear.app/comm/issue/ENG-9333/disable-editing-failed-messages Test Plan: On both native and web, in thin and thick thread check if the edit button is visible for successful messages and isn't shown for unsuccessful. Reviewers: kamil, will Reviewed By: kamil, will Subscribers: ashoat Differential Revision: https://phab.comm.dev/D13386 --- lib/shared/edit-messages-utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/shared/edit-messages-utils.js b/lib/shared/edit-messages-utils.js index 0ca4670ce9..618215b3dd 100644 --- a/lib/shared/edit-messages-utils.js +++ b/lib/shared/edit-messages-utils.js @@ -111,7 +111,7 @@ function useCanEditMessage( return false; } - if (targetMessageInfo.type !== messageTypes.TEXT) { + if (!targetMessageInfo.id || targetMessageInfo.type !== messageTypes.TEXT) { return false; }