You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by "chibenwa (via GitHub)" <gi...@apache.org> on 2023/05/15 02:59:15 UTC

[GitHub] [james-project] chibenwa commented on a diff in pull request #1561: [WIP]JAMES 4865 - FutureRelease for JMAP

chibenwa commented on code in PR #1561:
URL: https://github.com/apache/james-project/pull/1561#discussion_r1193283590


##########
server/protocols/jmap-rfc-8621/src/main/scala/org/apache/james/jmap/mail/EmailSubmissionSet.scala:
##########
@@ -122,7 +122,9 @@ case class EmailSubmissionId(value: Id)
 
 case class EmailSubmissionCreationResponse(id: EmailSubmissionId)
 
-case class EmailSubmissionAddress(email: MailAddress)
+case class Parameters(parameters: Map[String, String])
+
+case class EmailSubmissionAddress(email: MailAddress, parameters: Parameters)

Review Comment:
   We can IMO make parameters optional, this should allows us not to change the `EmailSubmissionSetMethod` code:
   
   ```suggestion
   case object Parameters {
      val EMPTY = Parameters(Map())
   }
   
   case class Parameters(parameters: Map[String, String])
   
   case class EmailSubmissionAddress(email: MailAddress, parameters: Parameters = EMPTY)
   ```
   
   Then we can keep `EmailSubmissionAddress(mailAddress)` and limit the boiler plate...



-- 
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: notifications-unsubscribe@james.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org