Skip to content

fix: adding circles to events (#6023)#8008

Draft
MrAn0nym wants to merge 1 commit intonextcloud:mainfrom
MrAn0nym:patch-2
Draft

fix: adding circles to events (#6023)#8008
MrAn0nym wants to merge 1 commit intonextcloud:mainfrom
MrAn0nym:patch-2

Conversation

@MrAn0nym
Copy link
Copy Markdown

ContactController::getCircleMembers is used to fetch all members of a circle, when adding that circle to an event.

Currently the function assumes members to be a nextcloud user:

$circleMemberUserId = $circleMember->getUserId();
$user = $this->userManager->get($circleMemberUserId);

This results in empty return values, which in turn causes an error and results in no member of the circle being added

if ($user === null) {
throw new ServiceException('Could not find organizer');
}

The PR changes the code to handle all types separately. Whilst this is not perfect and problems like federation or auto-updating memberlists are not solved by this it at least provides a short term fix for #6023 #6485 and one aspect of nextcloud/circles#1690 if I'm not mistaken.

Signed-off-by: MrAn0nym <63542658+MrAn0nym@users.noreply.github.com>
@MrAn0nym
Copy link
Copy Markdown
Author

Didn't manage to look into how one would write tests yet and I believe php-cs-fixer will at least replace some quotes as well. If anyone else has the time to fix those last steps feel free to do so, otherwise I'll do so when I get around

@SebastianKrupinski
Copy link
Copy Markdown
Contributor

Hi @MrAn0nym

Thank you for the PR.

FYI, you might want to wait a couple weeks for this, as there are some pending changes that will be applied to the contacts controller which might effect your work.

@github-actions
Copy link
Copy Markdown

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

(If you believe you should not receive this message, you can add yourself to the blocklist.)

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants