This is an automated email from the ASF dual-hosted git repository.

rcordier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit 71e12dd04df9c3342a429ecc71921aa13e424b1c
Author: LanKhuat <[email protected]>
AuthorDate: Tue Nov 10 17:35:20 2020 +0700

    JAMES-3439 Various refactorings regarding Email/set create attachments 
(mixed)
---
 .../james/jmap/rfc8621/contract/EmailSetMethodContract.scala      | 8 ++++----
 .../src/main/scala/org/apache/james/jmap/mail/EmailSet.scala      | 6 +++---
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git 
a/server/protocols/jmap-rfc-8621-integration-tests/jmap-rfc-8621-integration-tests-common/src/main/scala/org/apache/james/jmap/rfc8621/contract/EmailSetMethodContract.scala
 
b/server/protocols/jmap-rfc-8621-integration-tests/jmap-rfc-8621-integration-tests-common/src/main/scala/org/apache/james/jmap/rfc8621/contract/EmailSetMethodContract.scala
index bdf41cc..378fbbb 100644
--- 
a/server/protocols/jmap-rfc-8621-integration-tests/jmap-rfc-8621-integration-tests-common/src/main/scala/org/apache/james/jmap/rfc8621/contract/EmailSetMethodContract.scala
+++ 
b/server/protocols/jmap-rfc-8621-integration-tests/jmap-rfc-8621-integration-tests-common/src/main/scala/org/apache/james/jmap/rfc8621/contract/EmailSetMethodContract.scala
@@ -2154,9 +2154,9 @@ trait EmailSetMethodContract {
       .header(ACCEPT.toString, ACCEPT_RFC8621_VERSION_HEADER)
       .contentType("text/plain")
       .body(payload)
-      .when
+    .when
       .post(s"/upload/$ACCOUNT_ID/")
-      .`then`
+    .`then`
       .statusCode(SC_CREATED)
       .extract
       .body
@@ -2228,9 +2228,9 @@ trait EmailSetMethodContract {
     val response = `given`
       .header(ACCEPT.toString, ACCEPT_RFC8621_VERSION_HEADER)
       .body(request)
-      .when
+    .when
       .post
-      .`then`
+    .`then`
       .statusCode(SC_OK)
       .contentType(JSON)
       .extract
diff --git 
a/server/protocols/jmap-rfc-8621/src/main/scala/org/apache/james/jmap/mail/EmailSet.scala
 
b/server/protocols/jmap-rfc-8621/src/main/scala/org/apache/james/jmap/mail/EmailSet.scala
index a1a72a8..464be6d 100644
--- 
a/server/protocols/jmap-rfc-8621/src/main/scala/org/apache/james/jmap/mail/EmailSet.scala
+++ 
b/server/protocols/jmap-rfc-8621/src/main/scala/org/apache/james/jmap/mail/EmailSet.scala
@@ -33,7 +33,7 @@ import org.apache.james.jmap.mail.Disposition.INLINE
 import org.apache.james.jmap.mail.EmailSet.{EmailCreationId, UnparsedMessageId}
 import org.apache.james.jmap.method.WithAccountId
 import org.apache.james.mailbox.exception.AttachmentNotFoundException
-import org.apache.james.mailbox.model.{AttachmentId, AttachmentMetadata, 
MessageId, Cid => MailboxCid}
+import org.apache.james.mailbox.model.{AttachmentId, AttachmentMetadata, Cid, 
MessageId}
 import org.apache.james.mailbox.{AttachmentContentLoader, AttachmentManager, 
MailboxSession}
 import org.apache.james.mime4j.codec.EncoderUtil
 import org.apache.james.mime4j.codec.EncoderUtil.Usage
@@ -77,10 +77,10 @@ case class ClientEmailBodyValue(value: String,
                                 isTruncated: Option[IsTruncated])
 
 object ClientCid {
-  def of(entity: Entity): Option[MailboxCid] =
+  def of(entity: Entity): Option[Cid] =
     Option(entity.getHeader.getField(FieldName.CONTENT_ID))
       .flatMap {
-        case contentIdField: ContentIdField => 
MailboxCid.parser().relaxed().unwrap().parse(contentIdField.getId).toScala
+        case contentIdField: ContentIdField => 
Cid.parser().relaxed().unwrap().parse(contentIdField.getId).toScala
         case _ => None
       }
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to