Permalink
Browse files

Use channel instead of key.

  • Loading branch information...
1 parent fcaed51 commit 0f3efe3dcc1d5b3e02c77e95c7c920dcf29bc06d @luin committed Feb 12, 2013
Showing with 3 additions and 3 deletions.
  1. +3 −3 type/realtime.js
View
@@ -3,7 +3,7 @@ module.exports = function (ranaly) {
var Realtime = function (bucket) {
this.bucket = bucket;
- this.key = ranaly.prefix + 'REALTIME' + ':' + this.bucket;
+ this.channel = this.key = ranaly.prefix + 'REALTIME' + ':' + this.bucket;
};
Realtime.prototype.incr = function (increment, callback) {
@@ -17,7 +17,7 @@ module.exports = function (ranaly) {
db.incrby(this.key, increment, function (err, result) {
if (!err) {
- db.publish(this.key, result);
+ db.publish(this.channel, result);
}
if (typeof callback === 'function') {
callback(err, result);
@@ -34,7 +34,7 @@ module.exports = function (ranaly) {
Realtime.prototype.set = function (value, callback) {
value = parseInt(value, 10) || 0;
db.set(this.key, value, callback);
- db.publish(this.key, value);
+ db.publish(this.channel, value);
};
return Realtime;

0 comments on commit 0f3efe3

Please sign in to comment.