fix: Disable polling on custom domain, closes #2041

This commit is contained in:
Tom Moor 2021-04-18 18:58:26 -07:00
parent fa52bc5afd
commit ab267ce38d
2 changed files with 5 additions and 2 deletions

View File

@ -101,7 +101,10 @@ class SocketProvider extends React.Component<Props> {
// on reconnection, reset the transports option, as the Websocket
// connection may have failed (caused by proxy, firewall, browser, ...)
this.socket.on("reconnect_attempt", () => {
this.socket.io.opts.transports = ["polling", "websocket"];
this.socket.io.opts.transports =
auth.team && auth.team.domain
? ["websocket"]
: ["websocket", "polling"];
});
this.socket.on("authenticated", () => {

View File

@ -388,9 +388,9 @@
"Whoops, you need to accept the permissions in Slack to connect Outline to your team. Try again?": "Whoops, you need to accept the permissions in Slack to connect Outline to your team. Try again?",
"Something went wrong while authenticating your request. Please try logging in again?": "Something went wrong while authenticating your request. Please try logging in again?",
"Get rich previews of Outline links shared in Slack and use the <em>{{ command }}</em> slash command to search for documents without leaving your chat.": "Get rich previews of Outline links shared in Slack and use the <em>{{ command }}</em> slash command to search for documents without leaving your chat.",
"Disconnect": "Disconnect",
"Connect Outline collections to Slack channels and messages will be automatically posted to Slack when documents are published or updated.": "Connect Outline collections to Slack channels and messages will be automatically posted to Slack when documents are published or updated.",
"Connected to the <em>{{ channelName }}</em> channel": "Connected to the <em>{{ channelName }}</em> channel",
"Disconnect": "Disconnect",
"Connect": "Connect",
"Youve not starred any documents yet.": "Youve not starred any documents yet.",
"There are no templates just yet.": "There are no templates just yet.",