From: William Morgan Date: Sun, 30 Dec 2007 04:28:23 +0000 (-0800) Subject: bugfix: properly choose root messages for threading by subject X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=27a5f6ed7a0562ba1c5aeb2f79da352dc21770bf;p=sup bugfix: properly choose root messages for threading by subject --- diff --git a/lib/sup/thread.rb b/lib/sup/thread.rb index 4d92ad3..6519757 100644 --- a/lib/sup/thread.rb +++ b/lib/sup/thread.rb @@ -58,7 +58,7 @@ class Thread ## messages). def each fake_root=false adj = 0 - root = @containers.find_all { |c| !Message.subj_is_reply?(c) }.argmin { |c| c.date || 0 } + root = @containers.find_all { |c| c.message && !Message.subj_is_reply?(c.message.subj) }.argmin { |c| c.date } if root adj = 1