webXMPP

Check-in [9189e1db93]
Login

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

Overview
Comment:Permit FCM key to be left out, and drop support for Firebase.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | master | trunk
Files: files | file ages | folders
SHA3-256:9189e1db93315695e04e46fd81b6a7f512d5e026b3b1bc13c19b4a92ce020139
User & Date: web 2019-04-12 23:10:16
Context
2019-04-12
23:11
Set font size; especially good for FxOS which ended up with some bad defaults. check-in: feade2b803 user: web tags: master, trunk
23:10
Permit FCM key to be left out, and drop support for Firebase. check-in: 9189e1db93 user: web tags: master, trunk
2019-03-07
16:18
Support for experimental Web OS microservice architecture; notification light. check-in: c393c4bf57 user: web tags: master, trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to get.py.

    65     65   	if self.path_match("favicon.ico"):
    66     66   	    self.send_error(404)
    67     67   	    return True,None
    68     68   	return False,None
    69     69   
    70     70       # "/"; main UI
    71     71       def send_top(self):
    72         -	a = (self.headers.get("User-Agent") or "").lower()
    73     72   
    74     73   	# You just can't reliably message to mobile Chrome without using
    75     74   	#  Google's push service.
    76         -	# if ("mobile" in a) and ...
    77         -	if "chrom" in a:
    78         -	    return self.send_redir("/html/xmpp_fcm.html")
           75  +	approot = self.server.approot
           76  +	if approot.fcmkey:
           77  +	    a = (self.headers.get("User-Agent") or "").lower()
           78  +	    if "chrom" in a:
           79  +		return self.send_redir("/html/xmpp_fcm.html")
    79     80   	return self.send_redir("/html/xmpp.html")
    80     81   
    81     82       # The Service Worker script has to be at the root, peer with
    82     83       #  the HTML.  So let it be found here, even though it lives down
    83     84       #  with the rest of the JS for purposes of actual storage.
    84     85       # Same deal with magic file "manifest.json".  Web apps are dying,
    85     86       #  but this stuff sticks around like soap scum in your bathtub.