Skip to content

Commit

Permalink
Merge pull request #13 from hennes-maertins/master
Browse files Browse the repository at this point in the history
Fixed ZeroDivisionError in html formatter.
  • Loading branch information
tvdstaaij committed Mar 27, 2016
2 parents d030c60 + 7faa525 commit 8fa1cb6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions formatters/html.rb
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ def format_dialog(dialog, messages)
last = msg['media']['last_name']
msg_body = "<div class=contact>Contact: #{first} <!--first-last-->#{last}, +#{phone}</div>"
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'
Expand Down

0 comments on commit 8fa1cb6

Please sign in to comment.