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

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

        return SignalProducer<MailData, PostalError> { observer, disposable in
            self.fetchAttachments(folder, uid: uid, partId: partId,
                onAttachment: { data in
                    observer.send(value: data)
                },
                onComplete: { error in
                    if let error = error {
                        observer.send(error: error)
                    } else {
                        observer.sendCompleted()
                    }
