Moved system level messages out of SubscriptionDefinition; added postal.unsubscribe and removed unnecessary refs to localBus and replaced with module ref of same calls

This commit is contained in:
ifandelse 2013-08-12 18:08:44 -04:00
parent 3b5b235227
commit 92c242c096
4 changed files with 9 additions and 9 deletions

View file

@ -73,7 +73,7 @@
arguments[0]) :
{ topic : arguments[0], data : arguments[1] };
envelope.channel = this.channel;
return postal.configuration.bus.publish( envelope );
return postal.publish( envelope );
};
var SubscriptionDefinition = function ( channel, topic, callback ) {
this.channel = channel;
@ -83,9 +83,9 @@
this.context = null;
};
SubscriptionDefinition.prototype = {
_.extend( SubscriptionDefinition.prototype, {
unsubscribe : function () {
if(!this.inactive) {
if( !this.inactive ) {
this.inactive = true;
postal.unsubscribe( this );
}
@ -190,7 +190,7 @@
this.callback = callback;
return this;
}
};
});
var bindingsResolver = {
cache : {},
regex : {},

2
lib/postal.min.js vendored

File diff suppressed because one or more lines are too long

View file

@ -15,5 +15,5 @@ ChannelDefinition.prototype.publish = function () {
arguments[0]) :
{ topic : arguments[0], data : arguments[1] };
envelope.channel = this.channel;
return postal.configuration.bus.publish( envelope );
return postal.publish( envelope );
};

View file

@ -6,9 +6,9 @@ var SubscriptionDefinition = function ( channel, topic, callback ) {
this.context = null;
};
SubscriptionDefinition.prototype = {
_.extend( SubscriptionDefinition.prototype, {
unsubscribe : function () {
if(!this.inactive) {
if( !this.inactive ) {
this.inactive = true;
postal.unsubscribe( this );
}
@ -113,4 +113,4 @@ SubscriptionDefinition.prototype = {
this.callback = callback;
return this;
}
};
});