[pim/kdepim-addons] kmail/checkbeforedeletemailplugins/confirmbeforedeleting: We need to decode text otherwise we can't check contains string

Laurent Montel <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit 1aa411fcd03cc0055b8e390717aff74fd8a5c071 by Laurent Montel.
Committed on 15/08/2026 at 13:14.
Pushed by mlaurent into branch 'master'.

We need to decode text otherwise we can't check contains string

M  +1    -1    kmail/checkbeforedeletemailplugins/confirmbeforedeleting/confirmbeforedeletingrule.cpp

https://invent.kde.org/pim/kdepim-addons/-/commit/1aa411fcd03cc0055b8e390717aff74fd8a5c071

diff --git a/kmail/checkbeforedeletemailplugins/confirmbeforedeleting/confirmbeforedeletingrule.cpp b/kmail/checkbeforedeletemailplugins/confirmbeforedeleting/confirmbeforedeletingrule.cpp
index eb775eecc..507fcedc8 100644
--- a/kmail/checkbeforedeletemailplugins/confirmbeforedeleting/confirmbeforedeletingrule.cpp
+++ b/kmail/checkbeforedeletemailplugins/confirmbeforedeleting/confirmbeforedeletingrule.cpp
@@ -119,7 +119,7 @@ bool ConfirmBeforeDeletingRule::deletingNeedToConfirm(const Akonadi::Item &item,
         auto msg = item.payload<std::shared_ptr<KMime::Message>>();
         switch (mRuleType) {
         case Body: {
-            const auto ba = msg->body();
+            const auto ba = msg->decodedText().toUtf8();
             if (QString::fromUtf8(ba).contains(pattern())) {
                 needToConfirm = true;
                 generateConfirmMessageInfo(msg, checkFoundInfo);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.