diff --git a/lib/bmf/lib/message_store.rb b/lib/bmf/lib/message_store.rb index ffac10e..a84d8fb 100644 --- a/lib/bmf/lib/message_store.rb +++ b/lib/bmf/lib/message_store.rb @@ -73,6 +73,11 @@ def add_message msgid,m m["subject"] = " " if m["subject"] == "" m["subject"] = "Re: " if m["subject"] == "Re: " + if m["message"].include?("\r") + m["message"] = m["message"].gsub("\r\n","\n").gsub("\n\r","\n") + end + + @messages[msgid] = m to_address = m["toAddress"] diff --git a/lib/bmf/lib/threaded_messages.rb b/lib/bmf/lib/threaded_messages.rb index c995d52..d1fc286 100644 --- a/lib/bmf/lib/threaded_messages.rb +++ b/lib/bmf/lib/threaded_messages.rb @@ -83,6 +83,8 @@ def initialize def insert message msg = BMF::ThreadedMessage.new(message) + puts msg.message['message'].inspect + @children.each do |c| c.suspected_orphan(msg) end