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

Send notification mail for circle invitation #1349

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

onny
Copy link

@onny onny commented Jul 19, 2023

Get notified if someone invites you into a circle.

image

Fixes #235

@onny onny changed the title [Draft] Send notification mails for circle invitations [Draft] Send notification mail for circle invitation Jul 19, 2023
@onny onny force-pushed the addmember-invite-mail branch 8 times, most recently from 7d4e51c to 9116356 Compare July 25, 2023 16:51
Signed-off-by: Jonas Heinrich <heinrich@synyx.de>
@onny onny force-pushed the addmember-invite-mail branch from 9116356 to ce6de43 Compare July 25, 2023 16:53
@onny onny changed the title [Draft] Send notification mail for circle invitation Send notification mail for circle invitation Jul 25, 2023
@onny onny marked this pull request as ready for review July 25, 2023 16:53
@onny
Copy link
Author

onny commented Jul 26, 2023

Will be happy for a review, it's my first contribution to Circles @ArtificialOwl 😊

@onny
Copy link
Author

onny commented Jul 28, 2023

Happy for review @susnux :)

Comment on lines +123 to +125
} catch (Exception $e) {
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

What happens during this exception? You probably want to write this on the logs?

$message->setHtmlBody($emailTemplate->renderHtml());
$message->setTo([$recipient]);

$this->mailer->send($message);
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't know but it could be possible to build all the mail templates and call the send function with an array of messages? (Related to the loop that calls sendMailInvitation on linr 122)

Copy link
Contributor

@nfebe nfebe left a comment

Choose a reason for hiding this comment

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

A few inline comments.

$author = $member->getInvitedBy()->getDisplayName();
} else {
$author = 'someone';
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
}
}
$author = ucfirst($author);

I see in the screen shot that test started with lower-case so, we want to start the statement and name in this case with caps.

@susnux
Copy link
Contributor

susnux commented Jul 31, 2023

Not sure if this is the best way to implement this, currently we using notifications, but activities would support mail out of the box (users can dis / enable mails). So we would not need to implement any mail logic here.

@ArtificialOwl you implemented the activities already but commented out it in the app info xml, should we try to enable them again?

@ArtificialOwl
Copy link
Member

@ArtificialOwl you implemented the activities already but commented out it in the app info xml, should we try to enable them again?

I am currently working on it

@github-actions
Copy link

github-actions bot commented Aug 3, 2023

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!

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.

Invite by notifications and email
5 participants