aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Kesselberg <mail@danielkesselberg.de>2025-07-21 11:24:16 +0200
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2025-07-23 09:21:29 +0000
commit9f8064aae28629e2d8902eae0bc066d9ae7a5e58 (patch)
treed5ef3b4af125263baeb6f480fffecc6d658fce61
parent807583c6781ed2e70572ccd75200f9212e33d2b6 (diff)
downloadnextcloud-server-backport/54016/stable31.tar.gz
nextcloud-server-backport/54016/stable31.zip
fix(imip): group messages by logging principal and uri as contextbackport/54016/stable31
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
-rw-r--r--lib/private/Calendar/Manager.php10
-rw-r--r--tests/lib/Calendar/ManagerTest.php4
2 files changed, 10 insertions, 4 deletions
diff --git a/lib/private/Calendar/Manager.php b/lib/private/Calendar/Manager.php
index 21370e74d54..e4c75e1ac6f 100644
--- a/lib/private/Calendar/Manager.php
+++ b/lib/private/Calendar/Manager.php
@@ -403,7 +403,10 @@ class Manager implements IManager {
}
if (empty($found)) {
- $this->logger->warning('iMip message event could not be processed because no corresponding event was found in any calendar ' . $principalUri . 'and UID' . $vEvent->{'UID'}->getValue());
+ $this->logger->warning('iMip message event could not be processed because no corresponding event was found in any calendar', [
+ 'principalUri' => $principalUri,
+ 'eventUid' => $vEvent->{'UID'}->getValue(),
+ ]);
return false;
}
@@ -518,7 +521,10 @@ class Manager implements IManager {
}
if (empty($found)) {
- $this->logger->warning('iMip message event could not be processed because no corresponding event was found in any calendar ' . $principalUri . 'and UID' . $vEvent->{'UID'}->getValue());
+ $this->logger->warning('iMip message event could not be processed because no corresponding event was found in any calendar', [
+ 'principalUri' => $principalUri,
+ 'eventUid' => $vEvent->{'UID'}->getValue(),
+ ]);
return false;
}
diff --git a/tests/lib/Calendar/ManagerTest.php b/tests/lib/Calendar/ManagerTest.php
index cecebcfc4cf..98ba10ed596 100644
--- a/tests/lib/Calendar/ManagerTest.php
+++ b/tests/lib/Calendar/ManagerTest.php
@@ -1077,7 +1077,7 @@ class ManagerTest extends TestCase {
$calendarData->add('METHOD', 'REPLY');
// construct logger return
$this->logger->expects(self::once())->method('warning')
- ->with('iMip message event could not be processed because no corresponding event was found in any calendar ' . $principalUri . 'and UID' . $calendarData->VEVENT->UID->getValue());
+ ->with('iMip message event could not be processed because no corresponding event was found in any calendar', ['principalUri' => $principalUri, 'eventUid' => $calendarData->VEVENT->UID->getValue()]);
// Act
$result = $manager->handleIMipReply($principalUri, $sender, $recipient, $calendarData->serialize());
// Assert
@@ -1525,7 +1525,7 @@ class ManagerTest extends TestCase {
$calendarData->add('METHOD', 'CANCEL');
// construct logger return
$this->logger->expects(self::once())->method('warning')
- ->with('iMip message event could not be processed because no corresponding event was found in any calendar ' . $principalUri . 'and UID' . $calendarData->VEVENT->UID->getValue());
+ ->with('iMip message event could not be processed because no corresponding event was found in any calendar', ['principalUri' => $principalUri, 'eventUid' => $calendarData->VEVENT->UID->getValue()]);
// Act
$result = $manager->handleIMipCancel($principalUri, $sender, $replyTo, $recipient, $calendarData->serialize());
// Assert