Skip to content

Commit 8fa1cb6

Browse files
committed
Merge pull request #13 from hennes-maertins/master
Fixed ZeroDivisionError in html formatter.
2 parents d030c60 + 7faa525 commit 8fa1cb6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

formatters/html.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,8 @@ def format_dialog(dialog, messages)
133133
last = msg['media']['last_name']
134134
msg_body = "<div class=contact>Contact: #{first} <!--first-last-->#{last}, +#{phone}</div>"
135135
end
136-
if msg['event'] == 'service' or msg['service'] or (message_count % timestamps_every == 0 and timestamps_every > 0)
137-
if message_count % timestamps_every == 0
136+
if msg['event'] == 'service' or msg['service'] or (timestamps_every > 0 and message_count % timestamps_every == 0)
137+
if timestamps_every > 0 and message_count % timestamps_every == 0
138138
text = date_message
139139
else
140140
if get_full_name(msg['from']) != '' # Some messages have no properly filled 'from'

0 commit comments

Comments
 (0)