webXMPP

Check-in [1a74c3b5c4]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:FCM's unreliable; need a time stamp to debug
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | master | trunk
Files: files | file ages | folders
SHA3-256:1a74c3b5c431a5e824196fd4747c161734923256522dbcba5c2904ce66e68e0a
User & Date: ajv-899-334-8894@vsta.org 2017-05-13 19:30:43
Context
2017-05-13
19:31
Oops, do an actual function invocation check-in: d903b75a36 user: ajv-899-334-8894@vsta.org tags: master, trunk
19:30
FCM's unreliable; need a time stamp to debug check-in: 1a74c3b5c4 user: ajv-899-334-8894@vsta.org tags: master, trunk
2017-04-22
17:29
Use the right ivar. For consistency, flag connection as closed (even though this shouldn't matter, the thread's going away RSN). check-in: f234e62aa5 user: ajv-899-334-8894@vsta.org tags: master, trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to fcm.py.

3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
..
32
33
34
35
36
37
38
39
40
#	Google Firebase Cloud Messaging
#
# Kinda sucks having to use a proprietary, closed-source
#  suite of API's, but Google sure as hell is slowly choking
#  out all other options.
# Viva la web.
#
import sys, httplib, json

# Google endpoint
FCMHOST = "fcm.googleapis.com"
FCMPATH = "/fcm/send"

class FCM_mixin(object):
    def __init__(self):
................................................................................
	headers = {
	    "Authorization": ("key=%s" % (self.fcmkey,)),
	    "Content-Type": "application/json",
	}
	sys.stderr.write("POST FCM to %r\n" % (iid_token,))
	h.request("POST", FCMPATH, data, headers)
	r = h.getresponse()
	sys.stderr.write(" FCM response %r reason %r\n" %
	    (r.status, r.reason))







|







 







|
|
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
..
32
33
34
35
36
37
38
39
40
#	Google Firebase Cloud Messaging
#
# Kinda sucks having to use a proprietary, closed-source
#  suite of API's, but Google sure as hell is slowly choking
#  out all other options.
# Viva la web.
#
import sys, httplib, json, time

# Google endpoint
FCMHOST = "fcm.googleapis.com"
FCMPATH = "/fcm/send"

class FCM_mixin(object):
    def __init__(self):
................................................................................
	headers = {
	    "Authorization": ("key=%s" % (self.fcmkey,)),
	    "Content-Type": "application/json",
	}
	sys.stderr.write("POST FCM to %r\n" % (iid_token,))
	h.request("POST", FCMPATH, data, headers)
	r = h.getresponse()
	sys.stderr.write("%s FCM response %r reason %r\n" %
	    (time.asctime(), r.status, r.reason))