Skip to content

refactor(room): Move one-to-one name resolution to RoomService#17791

Open
miaulalala wants to merge 1 commit intomainfrom
refactor/noid/move-room-getName-logic
Open

refactor(room): Move one-to-one name resolution to RoomService#17791
miaulalala wants to merge 1 commit intomainfrom
refactor/noid/move-room-getName-logic

Conversation

@miaulalala
Copy link
Copy Markdown
Contributor

Extract the lazy name reconstruction logic from Room::getName() into RoomService::resolveOneToOneName(). Room::getName() now delegates to it via Server::get(), keeping the same behaviour while moving the business logic to where it belongs.

AI-Assisted-By: Claude Sonnet 4.6 noreply@anthropic.com

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

🛠️ API Checklist

🏁 Checklist

  • ⛑️ Tests (unit and/or integration) are included or not possible
  • 📘 API documentation in docs/ has been updated or is not required
  • 🔖 Capability is added or not needed

Extract the lazy name reconstruction logic from Room::getName() into
RoomService::resolveOneToOneName(). Room::getName() now delegates to it
via Server::get(), keeping the same behaviour while moving the business
logic to where it belongs.

AI-Assisted-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Anna Larch <anna@nextcloud.com>
@miaulalala miaulalala self-assigned this Apr 23, 2026
Comment thread lib/Room.php
$roomService->setName($this, json_encode($users), '');
}
// TODO use DI
Server::get(RoomService::class)->resolveOneToOneName($this, $this->name);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But now we already create the RoomService while before it was only needed if the name was not fixed already, which it was for everything that got ever rendered/created after Nextcloud 20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants