messages: patch-messages: Use local database and mail files.
authorRicardo Wurmus <rekado@elephly.net>
Wed, 1 Apr 2020 05:18:34 +0000 (07:18 +0200)
committerRicardo Wurmus <rekado@elephly.net>
Wed, 1 Apr 2020 05:18:34 +0000 (07:18 +0200)
mumi/messages.scm

index 12609349cf5172627fd67af3865593fd94019f11..da6821232ec0df75586f202b0d18474d0f1e3dd0 100644 (file)
@@ -186,16 +186,13 @@ result for a while."
   (let ((key (list 'patch-messages bug-id)))
     (or (cached? key)
         (cache! key
-                (match
-                    (soap-invoke* (%config 'debbugs) get-bug-message-numbers bug-id)
-                  ((msg-nums . _)
-                   (map (lambda (msg-num)
-                          (with-input-from-file (download-message bug-id msg-num)
-                            (lambda ()
-                              (match (mbox->emails (current-input-port))
-                                ((email) (parse-email email))
-                                (_ #f)))))
-                        msg-nums)))))))
+                (map (lambda (msg)
+                       (with-input-from-file (mu:path msg)
+                         (lambda ()
+                           (match (mbox->emails (current-input-port))
+                             ((email) (parse-email email))
+                             (_ #f)))))
+                     (mu:message-list (format #f "bugid:~a" bug-id)))))))
 
 (define* (search-bugs query #:key (sets '()) (max 100))
   "Return a list of all bugs matching the given QUERY string.