Skip to content

fix: email shares need to convert recipient for userid#1572

Open
susnux wants to merge 1 commit into
mainfrom
fix/email-share
Open

fix: email shares need to convert recipient for userid#1572
susnux wants to merge 1 commit into
mainfrom
fix/email-share

Conversation

@susnux
Copy link
Copy Markdown
Contributor

@susnux susnux commented May 19, 2026

shareWith of an email share is the email address. But the email address is NOT always the userId.
So for that case we need to convert the email to the userId.

`shareWith` of an email share is the email address.
But the email address is NOT always the userId.
So for that case we need to convert the email to the userId.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
@susnux susnux added bug Something isn't working 3. to review Waiting for reviews labels May 19, 2026
}

$isGuest = $this->guestManager->isGuest($shareWith);
$isGuest = $this->guestManager->isGuest($guestId);
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

while isGuest also does this check we need the conversion anyways later for the sendInvite

@susnux susnux requested a review from icewind1991 May 20, 2026 11:05
@Antreesy
Copy link
Copy Markdown

If not mistaken, these are default values?

  • $this->config->useHashedEmailAsUserID() is truthy
  • Files app -> Sharing -> External shares -> Invite guest creates a guest account and thus ShareType is TYPE_USER

So what are steps to reach the new code?
With the default values I'm reaching this step with hashed email already. Otherwise convertation looks correct with respecting the app config

@susnux
Copy link
Copy Markdown
Contributor Author

susnux commented May 20, 2026

So what are steps to reach the new code?

Well its the same as old code ;)
I think the original idea here was that if a new email share to that guest is created by accident then they should receive the notification?

But would it not make sense to convert email shares to user shares then?
cc @icewind1991 @CarlSchwan

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

Labels

3. to review Waiting for reviews bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants