From mboxrd@z Thu Jan 1 00:00:00 1970 From: wmorgan-sup@masanjin.net (William Morgan) Date: Fri, 02 Nov 2007 08:17:58 -0700 Subject: [sup-talk] tiny fix for sup-faked message id's crashing sup-sync In-Reply-To: <472AF56C.5070807@quintic.co.uk> References: <321bb12900151bd3@IMSS-WIN> <472AF56C.5070807@quintic.co.uk> Message-ID: <1194016481-sup-2712@south> Excerpts from Marcus Williams's message of Fri Nov 02 03:01:16 -0700 2007: > ... you may want to remove the @id from the log message - wont this > always be nil at this point (as it gets assigned by this block)? Good point. A chance to use my k combinator! Check this out: --- lib/sup/message.rb (revision 658) +++ lib/sup/message.rb (working copy) @@ -62,8 +62,9 @@ if header["message-id"] sanitize_message_id header["message-id"] else - Redwood::log "faking message-id for message from #@from: #@id" - "sup-faked-" + Digest::MD5.hexdigest(raw_header) + returning("sup-faked-" + Digest::MD5.hexdigest(raw_header)) do |id| + Redwood::log "faking message-id for message from #@from: #{id}" + end end date = header["date"] God I love this language. -- William