Skip to content

Commit

Permalink
Merge pull request #200 from pusher/remove-notifications
Browse files Browse the repository at this point in the history
Remove old notifications references
  • Loading branch information
fbenevides committed Nov 13, 2023
2 parents 1812cb4 + 65e7622 commit 85d1780
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 105 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 5.2.0

- [CHANGED] Remove old notification references. It's no longer being used

## 5.1.3

[FIXED] Parsing of the extraTokens in webhook's isValid method
Expand Down
25 changes: 0 additions & 25 deletions lib/notification_client.js

This file was deleted.

18 changes: 0 additions & 18 deletions lib/notification_config.js

This file was deleted.

12 changes: 0 additions & 12 deletions lib/pusher.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ const requests = require("./requests")
const PusherConfig = require("./pusher_config")
const Token = require("./token")
const WebHook = require("./webhook")
const NotificationClient = require("./notification_client")

const validateChannel = function (channel) {
if (
Expand Down Expand Up @@ -52,10 +51,8 @@ const validateUserData = function (userData) {
* @constructor
* @param {Object} options
* @param {String} [options.host="api.pusherapp.com"] API hostname
* @param {String} [options.notification_host="api.pusherapp.com"] Notification API hostname
* @param {Boolean} [options.useTLS=false] whether to use TLS
* @param {Boolean} [options.encrypted=false] deprecated; renamed to `useTLS`
* @param {Boolean} [options.notification_encrypted=false] whether to use TLS for notifications
* @param {Integer} [options.port] port, default depends on the scheme
* @param {Integer} options.appId application ID
* @param {String} options.key application key
Expand All @@ -65,11 +62,6 @@ const validateUserData = function (userData) {
*/
function Pusher(options) {
this.config = new PusherConfig(options)
const notificationOptions = Object.assign({}, options, {
host: options.notificationHost,
encrypted: options.notificationEncrypted,
})
this.notificationClient = new NotificationClient(notificationOptions)
}

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

Pusher.prototype.notify = function () {
this.notificationClient.notify.apply(this.notificationClient, arguments)
}

/** Makes a POST request to Pusher, handles the authentication.
*
* Returns a promise resolving to a response, or rejecting to a RequestError.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "pusher",
"description": "Node.js client to interact with the Pusher Channels REST API",
"version": "5.1.3",
"version": "5.2.0",
"author": "Pusher <support@pusher.com>",
"contributors": [
{
Expand Down
49 changes: 0 additions & 49 deletions tests/integration/pusher/notification_client.js

This file was deleted.

0 comments on commit 85d1780

Please sign in to comment.