mu-scm: add support for thread-id
Code + doc + test
This commit is contained in:
@ -41,6 +41,8 @@
|
||||
subject
|
||||
|
||||
references
|
||||
thread-id
|
||||
|
||||
mailing-list
|
||||
|
||||
language
|
||||
@ -223,6 +225,15 @@ fake-message-id (see impls) are filtered out. If there are no references, return
|
||||
#f."
|
||||
(find-field message ':references))
|
||||
|
||||
(define-method (thread-id (message <message>))
|
||||
"Get the oldest (first) reference for MESSAGE, or message-id if there are none.
|
||||
If neither are available, return #f.
|
||||
This is method is useful to determine the thread a message is in."
|
||||
(let ((refs (references message)))
|
||||
(if (and refs (not (null? refs)))
|
||||
(car refs)
|
||||
(message-id message))))
|
||||
|
||||
(define-method (mailing-list (message <message>))
|
||||
"Get the mailing-list id for MESSAGE or #f if not available."
|
||||
(find-field message ':list))
|
||||
|
||||
Reference in New Issue
Block a user