diff options
Diffstat (limited to 'notmuch/src/thread.rs')
| -rw-r--r-- | notmuch/src/thread.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/notmuch/src/thread.rs b/notmuch/src/thread.rs index ffc1f2f..962b17d 100644 --- a/notmuch/src/thread.rs +++ b/notmuch/src/thread.rs @@ -81,13 +81,17 @@ where sub.to_string_lossy() } + //TODO Mark matched/unmatched authors. pub fn authors(self: &Self) -> Vec<String> { let athrs = unsafe { ffi::notmuch_thread_get_authors(self.ptr) }; + // Authors to messages that matched the query are located before the '|' + // while other authors are located after. athrs .to_string_lossy() - .split(',') - .map(|s| s.to_string()) + .split('|') + .flat_map(|s| s.split(',')) + .map(|s| s.trim().to_string()) .collect() } |
