mirror of
https://github.com/Hopiu/postal.js.git
synced 2026-05-12 09:03:09 +00:00
Adding extend logic to publish for clients not using fluent configuration
This commit is contained in:
parent
56438a43b6
commit
d742595f2e
3 changed files with 6 additions and 9 deletions
|
|
@ -193,9 +193,8 @@ var localBus = {
|
|||
|
||||
wireTaps: [],
|
||||
|
||||
publish: function(envelope) {
|
||||
envelope.exchange = envelope.exchange || DEFAULT_EXCHANGE;
|
||||
envelope.timeStamp = new Date();
|
||||
publish: function(config) {
|
||||
var envelope = _.extend(defaultConfiguration, { timeStamp: new Date() }, config);
|
||||
_.each(this.wireTaps,function(tap) {
|
||||
tap({
|
||||
exchange: envelope.exchange,
|
||||
|
|
|
|||
|
|
@ -191,9 +191,8 @@ var localBus = {
|
|||
|
||||
wireTaps: [],
|
||||
|
||||
publish: function(envelope) {
|
||||
envelope.exchange = envelope.exchange || DEFAULT_EXCHANGE;
|
||||
envelope.timeStamp = new Date();
|
||||
publish: function(config) {
|
||||
var envelope = _.extend(defaultConfiguration, { timeStamp: new Date() }, config);
|
||||
_.each(this.wireTaps,function(tap) {
|
||||
tap({
|
||||
exchange: envelope.exchange,
|
||||
|
|
|
|||
|
|
@ -21,9 +21,8 @@ var localBus = {
|
|||
|
||||
wireTaps: [],
|
||||
|
||||
publish: function(envelope) {
|
||||
envelope.exchange = envelope.exchange || DEFAULT_EXCHANGE;
|
||||
envelope.timeStamp = new Date();
|
||||
publish: function(config) {
|
||||
var envelope = _.extend(defaultConfiguration, { timeStamp: new Date() }, config);
|
||||
_.each(this.wireTaps,function(tap) {
|
||||
tap({
|
||||
exchange: envelope.exchange,
|
||||
|
|
|
|||
Loading…
Reference in a new issue