fix: message_edit event and edit caption in file (#2617)
* edit caption * Update Client.js * refactor: events combined into one line --------- Co-authored-by: alechkos <93551621+alechkos@users.noreply.github.com>
This commit is contained in:
parent
4009bb792b
commit
3dab4a3f41
1 changed files with 3 additions and 2 deletions
|
|
@ -644,7 +644,7 @@ class Message extends Base {
|
|||
let msg = window.Store.Msg.get(msgId);
|
||||
if (!msg) return null;
|
||||
|
||||
let catEdit = (msg.type === 'chat' && window.Store.MsgActionChecks.canEditText(msg));
|
||||
let catEdit = window.Store.MsgActionChecks.canEditText(msg) || window.Store.MsgActionChecks.canEditCaption(msg);
|
||||
if (catEdit) {
|
||||
const msgEdit = await window.WWebJS.editMessage(msg, message, options);
|
||||
return msgEdit.serialize();
|
||||
|
|
|
|||
Loading…
Reference in a new issue