Skip to content

Commit

Permalink
[lib] Disable editing failed messages
Browse files Browse the repository at this point in the history
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
  • Loading branch information
palys-swm committed Sep 19, 2024
1 parent 51d504a commit ead0ca1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/shared/edit-messages-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ function useCanEditMessage(
return false;
}

if (targetMessageInfo.type !== messageTypes.TEXT) {
if (!targetMessageInfo.id || targetMessageInfo.type !== messageTypes.TEXT) {
return false;
}

Expand Down

0 comments on commit ead0ca1

Please sign in to comment.