quantranhong1999 commented on code in PR #1561:
URL: https://github.com/apache/james-project/pull/1561#discussion_r1205179496
##########
server/protocols/jmap-rfc-8621/src/main/scala/org/apache/james/jmap/mail/EmailSubmissionSet.scala:
##########
@@ -128,18 +128,25 @@ case class EmailSubmissionAddress(email: MailAddress,
parameters: Option[Map[Par
case class Envelope(mailFrom: EmailSubmissionAddress, rcptTo:
List[EmailSubmissionAddress])
object EmailSubmissionCreationRequest {
- private val assignableProperties = Set("emailId", "envelope", "identityId",
"onSuccessUpdateEmail")
+ private val assignableProperties = Set("emailId", "envelope", "identityId",
"onSuccessUpdateEmail", "sendAt")
- def validateProperties(jsObject: JsObject):
Either[EmailSubmissionCreationParseException, JsObject] =
+ def validateProperties(jsObject: JsObject):
Either[EmailSubmissionCreationParseException, JsObject] = {
jsObject.keys.diff(assignableProperties) match {
case unknownProperties if unknownProperties.nonEmpty =>
Left(EmailSubmissionCreationParseException(SetError.invalidArguments(
SetErrorDescription("Some unknown properties were specified"),
Some(toProperties(unknownProperties.toSet)))))
- case _ => scala.Right(jsObject)
+ case _ => {
+ println("jsO" + jsObject)
+ scala.Right(jsObject)
+ }
}
+
+ }
}
case class EmailSubmissionCreationRequest(emailId: MessageId,
identityId: Option[Id],
- envelope: Option[Envelope])
\ No newline at end of file
+ envelope: Option[Envelope],
+ sendAt: UTCDate)
Review Comment:
sendAt: UTCDate (immutable; **server-set**) The date the submission was/will
be released for delivery.
=> Not in `EmailSubmissionCreationRequest`, but should be in something like
`EmailSubmission`/`EmailSubmissionGetResponse` IMO.
But we do not implement EmailSubmission/get yet, so maybe we do not need to
add the `sendAt` field to any POJO for now?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]