Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable30] fix(dav): Use IUser::getDisplayName directly #51282

Merged
merged 1 commit into from
Mar 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions apps/dav/lib/Controller/OutOfOfficeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ public function getOutOfOffice(string $userId): DataResponse {
* @param string $status Short text that is set as user status during the absence
* @param string $message Longer multiline message that is shown to others during the absence
* @param ?string $replacementUserId User id of the replacement user
* @param ?string $replacementUserDisplayName Display name of the replacement user
* @return DataResponse<Http::STATUS_OK, DAVOutOfOfficeData, array{}>|DataResponse<Http::STATUS_BAD_REQUEST, array{error: 'firstDay'|'statusLength'}, array{}>|DataResponse<Http::STATUS_UNAUTHORIZED, null, array{}>|DataResponse<Http::STATUS_NOT_FOUND, null, array{}>
*
* 200: Absence data
Expand All @@ -122,8 +121,6 @@ public function setOutOfOffice(
string $status,
string $message,
?string $replacementUserId,
?string $replacementUserDisplayName

): DataResponse {
$user = $this->userSession?->getUser();
if ($user === null) {
Expand All @@ -133,6 +130,7 @@ public function setOutOfOffice(
return new DataResponse(['error' => 'statusLength'], Http::STATUS_BAD_REQUEST);
}

$replacementUser = null;
if ($replacementUserId !== null) {
$replacementUser = $this->userManager->get($replacementUserId);
if ($replacementUser === null) {
Expand All @@ -153,7 +151,7 @@ public function setOutOfOffice(
$status,
$message,
$replacementUserId,
$replacementUserDisplayName
$replacementUser?->getDisplayName()
);
$this->coordinator->clearCache($user->getUID());

Expand Down
5 changes: 0 additions & 5 deletions apps/dav/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -730,11 +730,6 @@
"type": "string",
"nullable": true,
"description": "User id of the replacement user"
},
"replacementUserDisplayName": {
"type": "string",
"nullable": true,
"description": "Display name of the replacement user"
}
}
}
Expand Down
1 change: 0 additions & 1 deletion apps/dav/src/components/AbsenceForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,6 @@ export default {
status: this.status,
message: this.message,
replacementUserId: this.replacementUser?.user ?? null,
replacementUserDisplayName: this.replacementUser?.displayName ?? null,
})
showSuccess(this.$t('dav', 'Absence saved'))
} catch (error) {
Expand Down
4 changes: 2 additions & 2 deletions dist/dav-settings-personal-availability.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/dav-settings-personal-availability.js.map

Large diffs are not rendered by default.

Loading