]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix(userstatus): Also set the user status when the user has no status at all 42896/head
authorJoas Schilling <coding@schilljs.com>
Thu, 25 Jan 2024 10:05:48 +0000 (11:05 +0100)
committerJoas Schilling <coding@schilljs.com>
Thu, 25 Jan 2024 10:05:48 +0000 (11:05 +0100)
Signed-off-by: Joas Schilling <coding@schilljs.com>
apps/dav/lib/CalDAV/Status/StatusService.php

index 58f2d5883fcb2bd042278b965dd7db02466d5082..24e929f9d0e7339d649d16957d11e70dddc31aeb 100644 (file)
@@ -125,7 +125,7 @@ class StatusService {
                }
 
                // Only update the status if it's neccesary otherwise we mess up the timestamp
-               if($currentStatus !== null && $currentStatus->getMessageId() !== IUserStatus::MESSAGE_CALENDAR_BUSY) {
+               if($currentStatus === null || $currentStatus->getMessageId() !== IUserStatus::MESSAGE_CALENDAR_BUSY) {
                        // One event that fulfills all status conditions is enough
                        // 1. Not an OOO event
                        // 2. Current user status (that is not a calendar status) was not set after the start of this event