Skip to content

Commit

Permalink
app: fix logic for creating a new chat
Browse files Browse the repository at this point in the history
  • Loading branch information
jacquerie committed Jan 6, 2019
1 parent 48fe9a9 commit 6710b60
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def webhook_post():
db.session.commit()

timestamp = message['timestamp']
if customer.chats and customer.chats[-1].last_timestamp - timestamp < DAY:
if customer.chats and timestamp - customer.chats[-1].last_timestamp < DAY:
chat = customer.chats[-1]
chat.last_timestamp = timestamp
else:
Expand Down

0 comments on commit 6710b60

Please sign in to comment.