File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed
Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -1250,25 +1250,28 @@ export class AppImManager extends EventListenerBase<{
12501250 ! appDialogsManager . contextMenu ?. hasAddToFolderOpen ( ) &&
12511251 ! chat ?. input ?. editMsgId
12521252 ) {
1253- cancelEvent ( e ) ;
1254-
12551253 const forReply = e . metaKey || e . ctrlKey ;
12561254 if ( ! forReply && ! chat ?. input ?. isInputEmpty ( ) ) {
12571255 return ;
12581256 }
12591257
1260- if ( forReply && ! ( await chat . canSend ( ) ) ) {
1261- return ;
1262- }
1263-
12641258 const up = key === 'ArrowUp' ;
12651259 const { replyToMsgId} = this . chat . input ;
12661260 const { peerId, threadId} = this . chat ;
1267- const middleware = this . chat . bubbles . getMiddleware ( ) ;
12681261 if ( ( ! forReply && ! up ) || ( forReply && ! up && ! replyToMsgId ) ) {
12691262 return ;
12701263 }
12711264
1265+ cancelEvent ( e ) ;
1266+ const middleware = this . chat . bubbles . getMiddleware ( ) ;
1267+ if ( forReply && ! ( await chat . canSend ( ) ) ) {
1268+ return ;
1269+ }
1270+
1271+ if ( ! middleware ( ) ) {
1272+ return ;
1273+ }
1274+
12721275 this . managers . appMessagesManager . getFirstMessageToEdit ( {
12731276 peerId,
12741277 threadId,
You can’t perform that action at this time.
0 commit comments