MessageClickActions: Fix editing messages which failed to send (#2677)

This commit is contained in:
programminglaboratorys 2024-10-09 11:57:30 +03:00 committed by GitHub
parent 89bb3ee30a
commit 2dce060cf9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -74,7 +74,7 @@ export default definePlugin({
if (msg.deleted === true) return;
if (isMe) {
if (!settings.store.enableDoubleClickToEdit || EditStore.isEditing(channel.id, msg.id)) return;
if (!settings.store.enableDoubleClickToEdit || EditStore.isEditing(channel.id, msg.id) || msg.state !== "SENT") return;
MessageActions.startEditMessage(channel.id, msg.id, msg.content);
event.preventDefault();