sup

A curses threads-with-tags style email client

sup.git

git clone https://supmua.dev/git/sup/
commit d371c081ebe557cbe67b2428f75c9471a480e8ef
parent d1ee2a50e0c1a4a05bdbcec98d263cb673adc514
Author: William Morgan <wmorgan-sup@masanjin.net>
Date:   Wed, 20 Feb 2008 09:37:50 -0800

bugfix: ThreadSet claiming non-relevant videos are actually relevant

The call to @messages[mid] was a mistake because @messages is a SavingHash.
This was inserting spurious entries into @messages, which then caused
ThreadSet#relevant? to return true for any non-first messages in a thread (the
first one would be falsely added to @messages)

Diffstat:
M lib/sup/thread.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/sup/thread.rb b/lib/sup/thread.rb
@@ -259,7 +259,7 @@ class ThreadSet
     @thread_by_subj = thread_by_subj
   end
 
-  def thread_for_id mid; (c = @messages[mid]) && c.root.thread end
+  def thread_for_id mid; @messages.member?(mid) && @messages[mid].root.thread end
   def contains_id? id; @messages.member?(id) && !@messages[id].empty? end
   def thread_for m; thread_for_id m.id end
   def contains? m; contains_id? m.id end