Skip to content
This repository has been archived by the owner on Feb 11, 2019. It is now read-only.

Commit

Permalink
simplified publishing of acks
Browse files Browse the repository at this point in the history
  • Loading branch information
annasborysova committed Jul 9, 2015
1 parent 4f042bf commit 2f17172
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions vxyowsup/whatsapp.py
Expand Up @@ -82,9 +82,8 @@ def _send_ack(self, whatsapp_id):

@defer.inlineCallbacks
def _send_delivery_report(self, whatsapp_id):
exists = yield self.redis.exists(whatsapp_id)
if exists:
vumi_id = yield self.redis.get(whatsapp_id)
vumi_id = yield self.redis.get(whatsapp_id)
if vumi_id:
yield self.publish_delivery_report(user_message_id=vumi_id, delivery_status='delivered')
self.redis.delete(whatsapp_id)

Expand Down

0 comments on commit 2f17172

Please sign in to comment.