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

feat: add iMip Request Handling #10116

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

SebastianKrupinski
Copy link
Contributor

@SebastianKrupinski SebastianKrupinski commented Sep 8, 2024

Summary

  • added iMip request handling to automatically update calendar events

Checklist

Signed-off-by: SebastianKrupinski <[email protected]>
@@ -135,7 +135,11 @@ public function process(): void {
$sender = $imapMessage->getFrom()->first()->getEmail();
$recipient = $account->getEmail();
foreach ($imapMessage->scheduling as $schedulingInfo) { // an IMAP message could contain more than one iMIP object
if ($schedulingInfo['method'] === 'REPLY') {
if ($schedulingInfo['method'] === 'REQUEST') {
$processed = $this->calendarManager->handleIMipRequest($principalUri, $sender, $recipient, $schedulingInfo['contents']);
Copy link
Member

Choose a reason for hiding this comment

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

What Psalm says. Open the code in PHPStorm. It will help you see that the interface is lacking the method.

Ref nextcloud/server#47826 (review).

The app works with 30 and 31. Only 31 has the new API -> needs a method_exists check and a fallback

Copy link
Contributor Author

@SebastianKrupinski SebastianKrupinski Sep 9, 2024

Choose a reason for hiding this comment

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

see that the interface is lacking the method.

Correct me if I am wrong but is this not expected since the server PR that the mail app needs is NOT merged yet? The handleIMipRequest is a new method that I added to the server (see required PR link in description) and is NOT merged yet.

The app works with 30 and 31. Only 31 has the new API -> needs a method_exists check and a fallback

Okay, i was going to ask if we are going to back port this, but this answers my question.

Copy link
Member

Choose a reason for hiding this comment

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

Regardless of the backport you can have deployments of Mail on older versions of Nextcloud where the method doesn't exist. So your code has to expect the method to be missing and have a workaround.

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.

Cannot handle calendar invitation update
2 participants