Prevent NPE

pull/209/head
M66B 2 years ago
parent c1bbda3158
commit 1c5622c54e

@ -117,7 +117,7 @@ public class MessageClassifier {
EntityFolder dest = db.folder().getFolderByName(folder.account, classified); EntityFolder dest = db.folder().getFolderByName(folder.account, classified);
if (dest != null && dest.auto_classify_target && if (dest != null && dest.auto_classify_target &&
(pro || EntityFolder.JUNK.equals(dest.type)) && (pro || EntityFolder.JUNK.equals(dest.type)) &&
(!EntityFolder.JUNK.equals(dest.type) || !message.isNotJunk(context))) { (!EntityFolder.JUNK.equals(dest.type) || !message.isNotJunk(context))) {
EntityOperation.queue(context, message, EntityOperation.KEYWORD, MessageHelper.FLAG_CLASSIFIED, true); EntityOperation.queue(context, message, EntityOperation.KEYWORD, MessageHelper.FLAG_CLASSIFIED, true);
EntityOperation.queue(context, message, EntityOperation.MOVE, dest.id, false, true); EntityOperation.queue(context, message, EntityOperation.MOVE, dest.id, false, true);
message.ui_hide = true; message.ui_hide = true;
@ -173,7 +173,8 @@ public class MessageClassifier {
texts.add(message.subject); texts.add(message.subject);
String text = HtmlHelper.getFullText(file); String text = HtmlHelper.getFullText(file);
texts.add(text); if (text != null)
texts.add(text);
return texts; return texts;
} }

Loading…
Cancel
Save