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

Reflect calendar updates into twake mail #1162

Open
chibenwa opened this issue Aug 21, 2024 · 7 comments
Open

Reflect calendar updates into twake mail #1162

chibenwa opened this issue Aug 21, 2024 · 7 comments
Assignees
Labels

Comments

@chibenwa
Copy link
Member

chibenwa commented Aug 21, 2024

GIVEN I receive an email invitation
AND I accept it in my calendar
WHEN I open it in tmail
THEN it is marked as accepted in the blue bar

HOW?

Listen to calendar:event:notificationEmail:send exchange on RabbitMQ

{
    "senderEmail": "[email protected]",
    "recipientEmail": "[email protected]",
    "method": "REPLY",
    "event": "BEGIN:VCALENDAR\r\nVERSION:2.0\r\nPRODID:-\/\/Sabre\/\/Sabre VObject 4.1.3\/\/EN\r\nCALSCALE:GREGORIAN\r\nMETHOD:REPLY\r\nBEGIN:VTIMEZONE\r\nTZID:Europe\/Paris\r\nBEGIN:DAYLIGHT\r\nTZOFFSETFROM:+0100\r\nTZOFFSETTO:+0200\r\nTZNAME:CEST\r\nDTSTART:19700329T020000\r\nRRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU\r\nEND:DAYLIGHT\r\nBEGIN:STANDARD\r\nTZOFFSETFROM:+0200\r\nTZOFFSETTO:+0100\r\nTZNAME:CET\r\nDTSTART:19701025T030000\r\nRRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU\r\nEND:STANDARD\r\nEND:VTIMEZONE\r\nBEGIN:VEVENT\r\nUID:[email protected]\r\nDTSTAMP:20240821T130234Z\r\nSEQUENCE:0\r\nDTSTART:20240822T100000Z\r\nDTEND:20240822T110000Z\r\nSUMMARY:Test \r\nORGANIZER;CN=Benoit Tellier:mailto:[email protected]\r\nATTENDEE;PARTSTAT=ACCEPTED;CN=sonde-supervision-preprod.linagora@preprod-av\r\n ocat.fr:mailto:[email protected]\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n",
    "notify": true,
    "calendarURI": "65ae6175751dbd001b5799e8",
    "eventPath": "\/calendars\/65ae6175751dbd001b5799e8\/65ae6175751dbd001b5799e8\/[email protected]"
}

Given a REPLY method
Extract the UID of the event
Do a multimailbox search onto the X-Meeting-UID field (issue here! it might not be indexed we may need either to enrich the index or have a parallel datastructure for that lookup...) - parallel data structure looks easier... Though it is one more table!
Extract partStat from the event and set the flag on the corresponding email:

ACCEPTED: keywords/$accepted

This extension should be optional, this extension should be able to point to a separate RabbitMQ...
TENTATIVE: keywords/$tentativelyaccepted
DECLINED: keywords/$rejected

@chibenwa chibenwa added bug Something isn't working enhancement New feature or request and removed bug Something isn't working labels Aug 21, 2024
@HoussemNasri HoussemNasri self-assigned this Sep 25, 2024
@HoussemNasri
Copy link
Member

I have a few questions:

  • Who is updating this exchange calendar:event:notificationEmail:send, the calendar app, or tmail through some kind of integration?
  • I couldn't find any reference to notificationEmail in code, do we have to create it?
  • Should we care about integrations with other caldendar apps or just the Linagora's one?

@chibenwa
Copy link
Member Author

Who is updating this exchange calendar:event:notificationEmail:send, the calendar app, or tmail through some kind of integration?

The current calendar creates the exchnge and publishes messages to it.

TMail would:

  • Need to create the exchange if missing (CF recent AmqpForwardAttribute)
  • Create a (quorum) queue binded to this exchange
  • Actively consume that queue and work with it.

I couldn't find any reference to notificationEmail in code, do we have to create it?

Currently it only exist in OpenPaaS code, not in TMail code.

Should we care about integrations with other caldendar apps or just the Linagora's one?

No. If needed we could develop a connector producing messages for the other calendar at the format of the linagora one.

(good question)

@HoussemNasri
Copy link
Member

Refs #1033

@HoussemNasri
Copy link
Member

HoussemNasri commented Sep 29, 2024

This extension should be optional

What possible reasons for the user not wanting calendar changes to reflect in Twake mail?

@chibenwa
Copy link
Member Author

chibenwa commented Sep 29, 2024

This extension should be optional

What possible reasons for the user not wanting calendar changes to reflect in Twake mail?

That is the wrong way to think about it: do we have good reasons to deploy Twake Mail without OpenPaaS?

(The answer is 'yes' so this extension should be optional)

@chibenwa
Copy link
Member Author

Asked @HoussemNasri to investigate this design issue:

Do a multimailbox search onto the X-Meeting-UID field (issue here! it might not be indexed we may need either to enrich the index or have a parallel datastructure for that lookup...) - parallel data structure looks easier... Though it is one more table!

Design constraints:

  • No additional Cassandra table
  • Quick lookup from meeting uid to the email

@chibenwa
Copy link
Member Author

chibenwa commented Nov 21, 2024

Meeting slide:

openpaas-integration.pdf

Decision:

  • have two mode:
    • Mode standalone like today sends a mail and updates flags
    • Mode DAV would query calendar for participation

tasks:

  • Blocker: document the DAV queries we want as curl

@HoussemNasri will work on that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants