             }
             return self
         case .multipart(let id, let mimeType, let parts):
-            return .multipart(id: id, mimeType: mimeType, parts: parts.map { $0.mergeAttachments(attachments) })
+            return .multipart(id: id, mimeType: mimeType, parts: parts.map { $0.mergeAttachments(attachments: attachments) })
         case .message(let id, let header, let message):
-            return .message(id: id, header: header, message: message.mergeAttachments(attachments))
+            return .message(id: id, header: header, message: message.mergeAttachments(attachments: attachments))
         }
     }
 }

            self.listFolders { result in
                result.analysis(
                    ifSuccess: { folders in
                        observer.sendNext(folders)
                        observer.sendCompleted()
                    },
                    ifFailure: observer.sendFailed)
                }
            }
    }

        return FetchResult(uid: uid,
                           header: header,
                           flags: flags,
                           body: body?.mergeAttachments(attachments: attachments),
                           rfc822Size: rfc822Size,
                           internalDate: internalDate,
                           gmailThreadId: gmailThreadId,
