Skip to content

Commit

Permalink
Push fix
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickbaumann committed Apr 19, 2011
1 parent 269dc77 commit 7db1931
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions geocamTalk/models.py
Expand Up @@ -117,9 +117,6 @@ def has_audio(self):


def push_to_phone(self, pushToSender = True): 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() push_recipients = self.recipients.all()
if(push_recipients.count() == 0): if(push_recipients.count() == 0):
Expand All @@ -142,6 +139,9 @@ def push_to_phone(self, pushToSender = True):
"Authorization":"GoogleLogin auth=" + GOOGLE_TOKEN # TOKEN set manually in authentication.py "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) httpsconnection.request("POST", "/c2dm/send", params, headers)


def get_audio_url(self): def get_audio_url(self):
Expand Down

0 comments on commit 7db1931

Please sign in to comment.