Permalink
Browse files

Push fix

  • Loading branch information...
1 parent 269dc77 commit 7db19314266887f2b8b416b64ee25cb0bb79f4eb @patrickbaumann patrickbaumann committed Apr 19, 2011
Showing with 3 additions and 3 deletions.
  1. +3 −3 geocamTalk/models.py
View
@@ -117,9 +117,6 @@ def has_audio(self):
def push_to_phone(self, pushToSender = True):
- # NOW SEND THE REQUEST TO GOOGLE SERVERS
- # first we need an https connection that ignores the certificate (for now)
- httpsconnection = httplib.HTTPSConnection("android.apis.google.com", 443)
push_recipients = self.recipients.all()
if(push_recipients.count() == 0):
@@ -142,6 +139,9 @@ def push_to_phone(self, pushToSender = True):
"Authorization":"GoogleLogin auth=" + GOOGLE_TOKEN # TOKEN set manually in authentication.py
}
+ # NOW SEND THE REQUEST TO GOOGLE SERVERS
+ # first we need an https connection that ignores the certificate (for now)
+ httpsconnection = httplib.HTTPSConnection("android.apis.google.com", 443)
httpsconnection.request("POST", "/c2dm/send", params, headers)
def get_audio_url(self):

0 comments on commit 7db1931

Please sign in to comment.