haraka-plugin-redis
Advanced tools
Comparing version 1.0.6 to 1.0.7
# 1.0.7 - 2017-07-31 | ||
- apply config [opts] to pubsub settings #7 | ||
# 1.0.6 - 2017-06-16 | ||
@@ -3,0 +7,0 @@ |
17
index.js
@@ -39,3 +39,6 @@ 'use strict'; | ||
if (!plugin.redisCfg.opts) plugin.redisCfg.opts = {}; | ||
if (plugin.redisCfg.opts === undefined) plugin.redisCfg.opts = {}; | ||
Object.keys(plugin.redisCfg.opts).forEach(opt => { | ||
if (ps[opt] === undefined) ps[opt] = plugin.redisCfg.opts[opt]; | ||
}); | ||
}; | ||
@@ -83,3 +86,3 @@ | ||
else { | ||
var opts = plugin.redisCfg.opts; | ||
let opts = JSON.parse(JSON.stringify(plugin.redisCfg.opts)); | ||
opts.host = plugin.redisCfg.server.host; | ||
@@ -189,6 +192,3 @@ opts.port = plugin.redisCfg.server.port; | ||
plugin.redis = require('redis').createClient({ | ||
host: plugin.redisCfg.pubsub.host, | ||
port: plugin.redisCfg.pubsub.port, | ||
}) | ||
plugin.redis = require('redis').createClient(plugin.redisCfg.pubsub) | ||
.on('psubscribe', function (pattern2, count) { | ||
@@ -212,6 +212,3 @@ plugin.logdebug(plugin, 'psubscribed to ' + pattern2); | ||
connection.notes.redis = require('redis').createClient({ | ||
host: plugin.redisCfg.pubsub.host, | ||
port: plugin.redisCfg.pubsub.port, | ||
}) | ||
connection.notes.redis = require('redis').createClient(plugin.redisCfg.pubsub) | ||
.on('psubscribe', function (pattern, count) { | ||
@@ -218,0 +215,0 @@ connection.logdebug(plugin, 'psubscribed to ' + pattern); |
{ | ||
"name": "haraka-plugin-redis", | ||
"version": "1.0.6", | ||
"version": "1.0.7", | ||
"description": "Redis plugin for Haraka & other plugins to inherit from", | ||
@@ -10,3 +10,3 @@ "main": "index.js", | ||
"dependencies": { | ||
"redis": "^2.6.5" | ||
"redis": "^2.7.1" | ||
}, | ||
@@ -13,0 +13,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
16364
0
252
Updatedredis@^2.7.1