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: [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]

Reply via email to