Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

RFE: remove pusher.com dependency #393

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ module.exports = new TeletypePackage({
commandRegistry: atom.commands,
tooltipManager: atom.tooltips,
clipboard: atom.clipboard,
activePubSubGateway: atom.config.get('teletype.dev.activePubSubGateway'),
pusherKey: atom.config.get('teletype.dev.pusherKey'),
pusherOptions: {
cluster: atom.config.get('teletype.dev.pusherCluster'),
Expand Down
5 changes: 4 additions & 1 deletion lib/teletype-package.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class TeletypePackage {
const {
baseURL, config, clipboard, commandRegistry, credentialCache, getAtomVersion,
notificationManager, packageManager, peerConnectionTimeout, pubSubGateway,
pusherKey, pusherOptions, tetherDisconnectWindow, tooltipManager,
activePubSubGateway, pusherKey, pusherOptions, tetherDisconnectWindow, tooltipManager,
workspace
} = options

Expand All @@ -26,6 +26,7 @@ class TeletypePackage {
this.tooltipManager = tooltipManager
this.clipboard = clipboard
this.pubSubGateway = pubSubGateway
this.activePubSubGateway = activePubSubGateway
this.pusherKey = pusherKey
this.pusherOptions = pusherOptions
this.baseURL = baseURL
Expand All @@ -34,6 +35,7 @@ class TeletypePackage {
this.tetherDisconnectWindow = tetherDisconnectWindow
this.credentialCache = credentialCache || new CredentialCache()
this.client = new TeletypeClient({
activePubSubGateway: this.activePubSubGateway,
pusherKey: this.pusherKey,
pusherOptions: this.pusherOptions,
baseURL: this.baseURL,
Expand All @@ -48,6 +50,7 @@ class TeletypePackage {
}

activate () {
console.log('teletype: Using pubsub gateway:', this.activePubSubGateway)
console.log('teletype: Using pusher key:', this.pusherKey)
console.log('teletype: Using base URL:', this.baseURL)

Expand Down
7 changes: 7 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,13 @@
"type": "string",
"default": "mt1",
"order": 3
},
"activePubSubGateway": {
"title": "The pubSubGateway that should be used for teletype (pusher or socketcluster)",
"description": "This should only be changed for development purposes. Changes take effect on the next package activation.",
"type": "string",
"default": "pusher",
"order": 4
}
}
}
Expand Down