From 7faa525ec5605ca8b6822fd496cd6464dd7a00c5 Mon Sep 17 00:00:00 2001 From: hennes-maertins Date: Sun, 27 Mar 2016 13:33:45 +0200 Subject: [PATCH] Fixed ZeroDivisionError in html formatter. --- formatters/html.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/formatters/html.rb b/formatters/html.rb index b3c53f6..f6473ab 100644 --- a/formatters/html.rb +++ b/formatters/html.rb @@ -133,8 +133,8 @@ def format_dialog(dialog, messages) last = msg['media']['last_name'] msg_body = "
Contact: #{first} #{last}, +#{phone}
" end - if msg['event'] == 'service' or msg['service'] or (message_count % timestamps_every == 0 and timestamps_every > 0) - if message_count % timestamps_every == 0 + if msg['event'] == 'service' or msg['service'] or (timestamps_every > 0 and message_count % timestamps_every == 0) + if timestamps_every > 0 and message_count % timestamps_every == 0 text = date_message else if get_full_name(msg['from']) != '' # Some messages have no properly filled 'from'