fix(userstatus): Also set the user status when the user has no status at all

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2024-01-25 11:05:48 +01:00
parent e1b957e17b
commit 71add5561a
No known key found for this signature in database
GPG key ID: 74434EFE0D2E2205

View 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