File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
FlowCrypt/src/main/java/com/flowcrypt/email/service Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -639,6 +639,23 @@ public void handleMessage(Message message) {
639639 com .flowcrypt .email .api .email .Folder [] folders = (com .flowcrypt .email
640640 .api .email .Folder []) action .getObject ();
641641
642+ String emailDomain = emailSyncManager .getAccountDao ().getAccountType ();
643+
644+ if (folders == null || folders .length != 2 ) {
645+ throw new IllegalArgumentException (emailDomain + "| Cannot move the message. Folders " +
646+ "are null." );
647+ }
648+
649+ if (folders [0 ] == null ) {
650+ throw new IllegalArgumentException (emailDomain + "| Cannot move the message. The " +
651+ "source folder is null." );
652+ }
653+
654+ if (folders [1 ] == null ) {
655+ throw new IllegalArgumentException (emailDomain + "| Cannot move the message. The " +
656+ "destination folder is null." );
657+ }
658+
642659 emailSyncManager .moveMessage (action .getOwnerKey (), action .getRequestCode (),
643660 folders [0 ].getServerFullFolderName (), folders [1 ].getServerFullFolderName (),
644661 message .arg1 );
You can’t perform that action at this time.
0 commit comments