You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by GitBox <gi...@apache.org> on 2022/11/01 11:37:51 UTC

[GitHub] [james-project] vttranlina commented on a diff in pull request #1286: [JMAP] Email/set create should add missing mimeMessageId and sentAt

vttranlina commented on code in PR #1286:
URL: https://github.com/apache/james-project/pull/1286#discussion_r1010336976


##########
server/protocols/jmap-rfc-8621/src/main/scala/org/apache/james/jmap/mail/EmailSet.scala:
##########
@@ -154,8 +157,13 @@ case class EmailCreationRequest(mailboxIds: MailboxIds,
             })
       }
 
-  private def createAlternativeBody(htmlBody: Option[String], textBody: Option[String], htmlTextExtractor: HtmlTextExtractor): MultipartBuilder = {
-    val alternativeBuilder: MultipartBuilder = MultipartBuilder.create(SubType.ALTERNATIVE_SUBTYPE)
+  private def generateUniqueMessageId(fromAddress: Option[List[Mailbox]]): String = {
+    val noDomain = null
+    MimeUtil.createUniqueMessageId(fromAddress.flatMap(_.headOption).map(_.getDomain).getOrElse(noDomain))
+  }

Review Comment:
   ```suggestion
     private def generateUniqueMessageId(fromAddress: Option[List[Mailbox]]): String = 
       MimeUtil.createUniqueMessageId(fromAddress.flatMap(_.headOption).map(_.getDomain).orNull)
   ```



-- 
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