@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Update AphlictClientServer to support ws2 or ws3

Summary: This lets us support either ws2 or ws3. Fixes T12755

Test Plan: Update server to version 3, send message, watch debug log. Downgrade to 2.x, send messages, watch debug log. Everything seems OK

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T12755

Differential Revision: https://secure.phabricator.com/D18411

+8 -2
+8 -2
support/aphlict/server/lib/AphlictClientServer.js
··· 92 92 var server = this._server.listen.apply(this._server, arguments); 93 93 var wss = new WebSocket.Server({server: server}); 94 94 95 - wss.on('connection', function(ws) { 96 - var path = url.parse(ws.upgradeReq.url).pathname; 95 + // This function checks for upgradeReq which is only available in 96 + // ws2 by default, not ws3. See T12755 for more information. 97 + wss.on('connection', function(ws, request) { 98 + if ('upgradeReq' in ws) { 99 + request = ws.upgradeReq; 100 + } 101 + 102 + var path = url.parse(request.url).pathname; 97 103 var instance = self._parseInstanceFromPath(path); 98 104 99 105 var listener = self.getListenerList(instance).addListener(ws);