Skip to content

Commit

Permalink
update changes
Browse files Browse the repository at this point in the history
  • Loading branch information
msimerson committed May 7, 2024
1 parent 81c6746 commit 9ed29e4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions Changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

- bounce: repackaged plugin as NPM module #3341
- connection: check remote is connected before queue #3338
- improve log message for queue* hooks, fixes #2998
- transaction: init with conn.init_transaction, always pass in cfg #3315
- check for local_mx only when default route is used #3307
- dkim: repackaged as NPM module #3311
Expand Down
11 changes: 8 additions & 3 deletions connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -1701,7 +1701,12 @@ class Connection {
});
}
queue_msg (retval, msg) {
if (msg) return msg;
if (msg) {
if (typeof msg === 'object' && msg.constructor.name === 'DSN') {
return msg.reply
}
return msg;
}

switch (retval) {
case constants.ok:
Expand Down Expand Up @@ -1737,7 +1742,7 @@ class Connection {
}
queue_outbound_respond (retval, msg) {
if (this.remote.closed) return;
if (!msg) msg = this.queue_msg(retval, msg) || 'Message Queued';
msg = this.queue_msg(retval, msg) || 'Message Queued';
this.store_queue_result(retval, msg);
msg = `${msg} (${this.transaction.uuid})`;
if (retval !== constants.ok) {
Expand Down Expand Up @@ -1813,7 +1818,7 @@ class Connection {
}
}
queue_respond (retval, msg) {
if (!msg) msg = this.queue_msg(retval, msg);
msg = this.queue_msg(retval, msg);
this.store_queue_result(retval, msg);
msg = `${msg} (${this.transaction.uuid})`;

Expand Down

0 comments on commit 9ed29e4

Please sign in to comment.