summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2018-11-11 20:43:56 +0100
committerRicardo Wurmus <rekado@elephly.net>2018-11-11 20:43:56 +0100
commitbfd96ce76b4600ae232e6548b26c9365095fd174 (patch)
tree3e45f6d9c5d51d44b12e66946d5c5832087387c5
parent0c224d253cfb4e47a01d6185b0d8986d58b63e28 (diff)
mumi: extract-attachment: Extract the mime-entity body.
* mumi/messages.scm (extract-attachment): Extract the mime-entity-body instead of expecting a tagged list.
-rw-r--r--mumi/messages.scm5
1 files changed, 2 insertions, 3 deletions
diff --git a/mumi/messages.scm b/mumi/messages.scm
index 3909c4b..e4222e9 100644
--- a/mumi/messages.scm
+++ b/mumi/messages.scm
@@ -100,7 +100,7 @@
'type)
'multipart))
-(define* (extract-attachment id msg-num path)
+(define (extract-attachment id msg-num path)
"Extract attachment from message number MSG-NUM in the thread for
the bug with the given ID. Follow PATH to get to the correct
multipart chunk containing the attachment. This is absolutely
@@ -117,8 +117,7 @@ we have to do this in a very convoluted way."
((pos . rest)
(loop rest
(and=> (nth pos parts)
- (lambda (chunk)
- (cadr (find-tail (cut eq? #:body <>) chunk)))))))))
+ mime-entity-body))))))
(and=> (fetch-bug id)
(lambda (bug)
(and=> (nth msg-num (patch-messages id))