[pim/akonadi-calendar] src: Fix recording invitations that don't exist in the calendar yet

Allen Winter <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit 68c7c360a1a422c8ad98af3a004d6ea432cff7ca by Allen Winter, on behalf of Volker Krause.
Committed on 07/08/2026 at 18:13.
Pushed by winterz into branch 'master'.

Fix recording invitations that don't exist in the calendar yet

This only handled the update case, but adding new events is just as valid
here.

This mainly helps with "untargeted" invitations, like announcing an event
without listing explicit attendees and/or requesting confirmation.

M  +5    -0    src/scheduler_p.cpp

https://invent.kde.org/pim/akonadi-calendar/-/commit/68c7c360a1a422c8ad98af3a004d6ea432cff7ca

diff --git a/src/scheduler_p.cpp b/src/scheduler_p.cpp
index 668cd136..15670799 100644
--- a/src/scheduler_p.cpp
+++ b/src/scheduler_p.cpp
@@ -144,6 +144,11 @@ void Scheduler::acceptPublish(const IncidenceBase::Ptr &incidence,
                     return;
                 }
             }
+        } else if (newInc) {
+            if (!calendar->addIncidence(newInc)) {
+                result = ResultCreatingError;
+                errorString = i18n("Error adding incidence");
+            }
         }
         break;
     case ScheduleMessage::Obsolete:
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.