Skip to content

Commit 85d1780

Browse files
authored
Merge pull request #200 from pusher/remove-notifications
Remove old notifications references
2 parents 1812cb4 + 65e7622 commit 85d1780

File tree

6 files changed

+5
-105
lines changed

6 files changed

+5
-105
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 5.2.0
4+
5+
- [CHANGED] Remove old notification references. It's no longer being used
6+
37
## 5.1.3
48

59
[FIXED] Parsing of the extraTokens in webhook's isValid method

lib/notification_client.js

-25
This file was deleted.

lib/notification_config.js

-18
This file was deleted.

lib/pusher.js

-12
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ const requests = require("./requests")
99
const PusherConfig = require("./pusher_config")
1010
const Token = require("./token")
1111
const WebHook = require("./webhook")
12-
const NotificationClient = require("./notification_client")
1312

1413
const validateChannel = function (channel) {
1514
if (
@@ -52,10 +51,8 @@ const validateUserData = function (userData) {
5251
* @constructor
5352
* @param {Object} options
5453
* @param {String} [options.host="api.pusherapp.com"] API hostname
55-
* @param {String} [options.notification_host="api.pusherapp.com"] Notification API hostname
5654
* @param {Boolean} [options.useTLS=false] whether to use TLS
5755
* @param {Boolean} [options.encrypted=false] deprecated; renamed to `useTLS`
58-
* @param {Boolean} [options.notification_encrypted=false] whether to use TLS for notifications
5956
* @param {Integer} [options.port] port, default depends on the scheme
6057
* @param {Integer} options.appId application ID
6158
* @param {String} options.key application key
@@ -65,11 +62,6 @@ const validateUserData = function (userData) {
6562
*/
6663
function Pusher(options) {
6764
this.config = new PusherConfig(options)
68-
const notificationOptions = Object.assign({}, options, {
69-
host: options.notificationHost,
70-
encrypted: options.notificationEncrypted,
71-
})
72-
this.notificationClient = new NotificationClient(notificationOptions)
7365
}
7466

7567
/** Create a Pusher instance using a URL.
@@ -237,10 +229,6 @@ Pusher.prototype.triggerBatch = function (batch) {
237229
return events.triggerBatch(this, batch)
238230
}
239231

240-
Pusher.prototype.notify = function () {
241-
this.notificationClient.notify.apply(this.notificationClient, arguments)
242-
}
243-
244232
/** Makes a POST request to Pusher, handles the authentication.
245233
*
246234
* Returns a promise resolving to a response, or rejecting to a RequestError.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "pusher",
33
"description": "Node.js client to interact with the Pusher Channels REST API",
4-
"version": "5.1.3",
4+
"version": "5.2.0",
55
"author": "Pusher <support@pusher.com>",
66
"contributors": [
77
{

tests/integration/pusher/notification_client.js

-49
This file was deleted.

0 commit comments

Comments
 (0)