webXMPP

Check-in [3aead6a44a]
Login

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

Overview
Comment:Try to force high priority (doesn't win versus doze anyway). Extra logging; message-id in particular
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | master | trunk
Files: files | file ages | folders
SHA3-256:3aead6a44a92b5fca81d87fa4d093d9eaedb0140c585e5be5b52ffc166c62fe5
User & Date: ajv-899-334-8894@vsta.org 2017-06-30 00:26:04
Context
2017-06-30
00:27
Merge branch 'master' of https://github.com/vandys/-webXMPP check-in: 4d5a71d733 user: vandyswa@gmail.com tags: master, trunk
00:26
Try to force high priority (doesn't win versus doze anyway). Extra logging; message-id in particular check-in: 3aead6a44a user: ajv-899-334-8894@vsta.org tags: master, trunk
2017-06-01
17:07
More fixups as online/offline actually matter check-in: 3a7eeca00e user: ajv-899-334-8894@vsta.org tags: master, trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to fcm.py.

18
19
20
21
22
23
24

25
26
27
28
29
30
31
..
34
35
36
37
38
39
40


	self.fcmkey = self.config.get("fcmkey")
    def fcm(self, host, iid_token, title, body):

	data = json.dumps(
	    {"notification": {
		 "title": title,
		 "body": body,

		 "click_action":
		     ("https://%s/html/xmpp_fcm.html" % (host,))
		},
	     "to": iid_token,
	    }
	)
	h = httplib.HTTPSConnection(FCMHOST)
................................................................................
	    "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))









>







 







>
>
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
..
35
36
37
38
39
40
41
42
43
	self.fcmkey = self.config.get("fcmkey")
    def fcm(self, host, iid_token, title, body):

	data = json.dumps(
	    {"notification": {
		 "title": title,
		 "body": body,
		 "priority": "high",
		 "click_action":
		     ("https://%s/html/xmpp_fcm.html" % (host,))
		},
	     "to": iid_token,
	    }
	)
	h = httplib.HTTPSConnection(FCMHOST)
................................................................................
	    "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))
	body = r.read()
	sys.stderr.write(" body: %r\n" % (body,))