-
Notifications
You must be signed in to change notification settings - Fork 25
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
Delegate the task of sending event attendance notification emails to StandaloneEventAttendanceRepository #1421
base: master
Are you sure you want to change the base?
Delegate the task of sending event attendance notification emails to StandaloneEventAttendanceRepository #1421
Conversation
- It was challenging to use Scala from a Java context especially when dealing with Refined types.
3ced5f5
to
0adf9d3
Compare
...c/main/scala/com/linagora/tmail/james/common/LinagoraCalendarEventAcceptMethodContract.scala
Outdated
Show resolved
Hide resolved
...ensions/src/main/java/com/linagora/tmail/james/jmap/StandaloneEventAttendanceRepository.java
Outdated
Show resolved
Hide resolved
...ensions/src/main/java/com/linagora/tmail/james/jmap/StandaloneEventAttendanceRepository.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
Next step: use EventAttendanceRepository in /accept /mayb /reject metods!
@Test | ||
def shouldFailWhenBlobIdIsNotPrefixedByMessageId(): Unit = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: This test is only appropriate for StandaloneEventAttendanceRepository
, as it is the only implementation currently available. Once a CarDav repository is implemented, this test should be moved to a standalone-specific location.
MailboxSession systemMailboxSession = sessionProvider.createSystemSession(username); | ||
|
||
return Flux.from(messageIdManager.getMessagesReactive(List.of(messageId), FetchGroup.MINIMAL, systemMailboxSession)) | ||
.map(MessageResult::getMailboxId) | ||
return getEnclosingMessageId(eventBlobIds).flatMap(messageId -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The assumption here that input Blobs will belong to the same email message is wrong, as nothing in the JMAP API explicitly says that; thus, the PR needs a bit more work.
Closes #1400