From 1a9748191b5f05fdd782bbf52d2d21d91d7a530d Mon Sep 17 00:00:00 2001 From: M66B Date: Sat, 27 Apr 2024 19:22:40 +0200 Subject: [PATCH] Updated changelog --- CHANGELOG.md | 8 ++++++++ app/src/main/assets/CHANGELOG.md | 8 ++++++++ .../java/eu/faircode/email/FragmentDialogSummarize.java | 5 +++++ metadata/en-US/changelogs/2177.txt | 8 ++++++++ 4 files changed, 29 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f7f2049cc..9eba9cd696 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,14 @@ For support you can use [the contact form](https://contact.faircode.eu/?product= ### [Acantholipan](https://en.wikipedia.org/wiki/Acantholipan) +### Next version + +* Added "AI" summarization of received messages (*) +* Small improvements and minor bug fixes +* Updated [translations](https://crowdin.com/project/open-source-email) + +(*) ChatGPT or Gemini needs to be configured in the integrations-settings tab page for this + ### 1.2177 - 2024-04-27 * Added [Have I Been Pwned?](https://haveibeenpwned.com/) **password** check (*) diff --git a/app/src/main/assets/CHANGELOG.md b/app/src/main/assets/CHANGELOG.md index 8f7f2049cc..9eba9cd696 100644 --- a/app/src/main/assets/CHANGELOG.md +++ b/app/src/main/assets/CHANGELOG.md @@ -6,6 +6,14 @@ For support you can use [the contact form](https://contact.faircode.eu/?product= ### [Acantholipan](https://en.wikipedia.org/wiki/Acantholipan) +### Next version + +* Added "AI" summarization of received messages (*) +* Small improvements and minor bug fixes +* Updated [translations](https://crowdin.com/project/open-source-email) + +(*) ChatGPT or Gemini needs to be configured in the integrations-settings tab page for this + ### 1.2177 - 2024-04-27 * Added [Have I Been Pwned?](https://haveibeenpwned.com/) **password** check (*) diff --git a/app/src/main/java/eu/faircode/email/FragmentDialogSummarize.java b/app/src/main/java/eu/faircode/email/FragmentDialogSummarize.java index 96c50c6f0b..566feee11b 100644 --- a/app/src/main/java/eu/faircode/email/FragmentDialogSummarize.java +++ b/app/src/main/java/eu/faircode/email/FragmentDialogSummarize.java @@ -101,12 +101,17 @@ public class FragmentDialogSummarize extends FragmentDialogBase { long id = args.getLong("id"); File file = EntityMessage.getFile(context, id); + if (!file.exists()) + return null; + Document d = JsoupEx.parse(file); d = HtmlHelper.sanitizeView(context, d, false); HtmlHelper.removeSignatures(d); d.select("blockquote").remove(); HtmlHelper.truncate(d, HtmlHelper.MAX_TRANSLATABLE_TEXT_SIZE); String text = d.text(); + if (TextUtils.isEmpty(text)) + return null; if (OpenAI.isAvailable(context)) { String model = prefs.getString("openai_model", "gpt-3.5-turbo"); diff --git a/metadata/en-US/changelogs/2177.txt b/metadata/en-US/changelogs/2177.txt index 66c71f7101..ee29a84cbb 100644 --- a/metadata/en-US/changelogs/2177.txt +++ b/metadata/en-US/changelogs/2177.txt @@ -6,6 +6,14 @@ For support you can use the contact form. Acantholipan +Next version + +* Added "AI" summarization of received messages (*) +* Small improvements and minor bug fixes +* Updated translations + +(*) ChatGPT or Gemini needs to be configured in the integrations-settings tab page for this + 1.2177 - 2024-04-27 * Added Have I Been Pwned?