From d030c603e67e136ec8e372d5e7c2667d9c609403 Mon Sep 17 00:00:00 2001 From: Tim van der Staaij Date: Fri, 4 Mar 2016 16:48:02 +0100 Subject: [PATCH] Fix oldest_message_date in pisg formatter --- formatters/pisg.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/formatters/pisg.rb b/formatters/pisg.rb index 94b122f..ceb7afc 100644 --- a/formatters/pisg.rb +++ b/formatters/pisg.rb @@ -40,7 +40,7 @@ def end_dialog(dialog) def format_message(dialog, message, output_stream) return unless message['date'] and message['from'] return if message['from']['print_name'].to_s == '' - @oldest_message_date = Time.at(message['date']) + @oldest_message_date ||= Time.at(message['date']) @users[message['from']['id']] = message['from'] lines = message['text'].to_s.split("\n") lines.push('') if lines.empty?