try next received header

This commit is contained in:
Andris Reinman 2017-10-20 16:27:03 +03:00
parent e203583991
commit e6e4e162f6
3 changed files with 7 additions and 5 deletions

View file

@ -111,13 +111,14 @@ module.exports = (options, callback) => {
return callback(err, ...args);
}
db.database.collection('messagelog').insertOne({
id: args[0],
id: args[0].id,
messageId: args[0].messageId,
parentId: options.parentId,
action: 'AUTOREPLY',
from: '',
to: options.sender,
created: new Date()
}, () => callback(err, ...args));
}, () => callback(err, args && args[0] && args[0].id));
}
);

View file

@ -28,7 +28,8 @@ module.exports = (options, callback) => {
return callback(err, ...args);
}
db.database.collection('messagelog').insertOne({
id: args[0],
id: args[0].id,
messageId: args[0].messageId,
action: 'FORWARD',
parentId: options.parentId,
from: options.sender,
@ -37,7 +38,7 @@ module.exports = (options, callback) => {
http: !!options.targetUrl,
targeUrl: options.targetUrl,
created: new Date()
}, () => callback(err, ...args));
}, () => callback(err, args && args[0] && args[0].id));
}
);

View file

@ -255,7 +255,7 @@ module.exports = (options, callback) => {
return callback(err);
}
callback(null, id);
callback(null, envelope);
});
});
});