Skip to content

feat(event): event from mail are linked with a new property and can be opened from the calendar app - #9207

Draft
taiebot wants to merge 2 commits into
nextcloud:mainfrom
taiebot:Deeplink_mail_PR
Draft

taiebot wants to merge 2 commits into
nextcloud:mainfrom
taiebot:Deeplink_mail_PR

Conversation

@taiebot

@taiebot taiebot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

An event created from the mail app can carry a new property X-NEXTCLOUD-MAIL-MESSAGE-ID .

See the original proposal in here nextcloud/mail#13052 but technically now all we do is adding a tiny icon when the event carry the property and when we click on it it opens the mail app on the event

image

Add the X-NEXTCLOUD-MAIL-MESSAGE-ID property to events created from a message so that Calendar can link back to the email.

Mail app needs nextcloud/mail#14128

Assisted-by: Claude:claude-sonnet-5-5

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI (N/A)

…a mail (#4)

Add the X-NEXTCLOUD-MAIL-MESSAGE-ID property to events created from a
message so that Calendar can link back to the email.

Mail app needs nextcloud/mail#14128

Assisted-by: Claude:claude-sonnet-5-5
@taiebot taiebot changed the title feat(event): store the source message ID when creating an event from … feat(event): event from mail are linked with a new property and can be opened from the calendar app Nov 11, 2026

@SebastianKrupinski SebastianKrupinski left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hi @taiebot

I think this is a bad idea... these properties get sent in iTip and iMip messages... so essentially you are sending out private information to other users

@taiebot

taiebot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor Author

@SebastianKrupinski

Does Nextcloud Calendar has a mechanism to filter internal X- properties during invitation generation ? We could keep the property in mail and do a filtering before sending it. That seems the best implementation to keep private information in nextcloud.

This is the .ics

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Nextcloud Mail
BEGIN:VEVENT
CREATED:20261111T202611Z
DTSTAMP:20261111T202611Z
LAST-MODIFIED:20261111T202611Z
SEQUENCE:1
UID:8d3bdbca-477e-4d40-9811-9537a504a505
DTSTART;VALUE=DATE:20261112
DTEND;VALUE=DATE:20261112
SUMMARY:admin a proposé une réunion
DESCRIPTION:CHER KMSMJOPXRHQQZYBQEM@JBSZE.COM\, UNE NOUVELLE RÉUNION A ÉT
 É PROPOSÉE                  Répondre   •  _Durée :_ 30 minutes  • 
  _Dates:_ 26 juillet 2026 de 09:15 à 09:45 28 juillet 2026 de 08:45 à 09
 :15 30 juillet 2026 de 08:15 à 08:45 30 juil
X-NEXTCLOUD-MAIL-MESSAGE-ID:<20260725202548.Horde.8q6vT0JAV3f2HThNMG-OJeo@l
 ocalhost>
END:VEVENT
END:VCALENDAR

@taiebot
taiebot marked this pull request as draft November 12, 2026 20:05
@taiebot

taiebot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor Author

@SebastianKrupinski Ok, it would be nice to implement, but there might be too many restrictions on this PR. Let me know if it is worth pursuing.

What we could do is patch the IMipPlugin so these Nextcloud properties are not included in outgoing iMIP emails, while events delivered locally between Nextcloud users keep them.

The link can be opened by anyone who received the mail (deeplink). I thought it was a clever use of these properties and was planning to do the same for tasks too.

Example of the patch needed for the IMipPlugin:

 		$template->addFooter();
-		// convert iTip Message to string
-		$itip_msg = $iTipMessage->message->serialize();
+
+		// Don't leak private Nextcloud properties to the recipient.
+		// Work on a copy: the original iTIP message is also used for local delivery.
+		$itipCalendar = clone $iTipMessage->message;
+		foreach ($itipCalendar->select('VEVENT') as $itipEvent) {
+			$itipEvent->remove('X-NEXTCLOUD-MAIL-MESSAGE-ID');
+		}
+
+		// convert iTip Message to string
+		$itip_msg = $itipCalendar->serialize();

@SebastianKrupinski

Copy link
Copy Markdown
Contributor

@SebastianKrupinski

Does Nextcloud Calendar has a mechanism to filter internal X- properties during invitation generation ?

No, neither NC or Sabre have this

@SebastianKrupinski

Copy link
Copy Markdown
Contributor

What we could do is patch the IMipPlugin so these Nextcloud properties are not included in outgoing iMIP emails, while events delivered locally between Nextcloud users keep them.

Yes that would be the right solution, I would need to speak to the team about this, I might include this improvement, in some of the changes I am making.

See review in mail app nextcloud/mail#14128 (comment)

Signed-off-by: taiebot <13300652+taiebot@users.noreply.github.com>
@taiebot

taiebot commented Nov 21, 2026

Copy link
Copy Markdown
Contributor Author

Ok let me know what you plan to do... I would love to see this land in calendar and tasks

@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.)

This branch has not been deployed

No deployments
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