fix: node v12 support

This commit is contained in:
Pedro Lopez
2021-08-01 23:56:27 -04:00
parent d9ccb6f276
commit 40cec51956
2 changed files with 6 additions and 2 deletions

View File

@@ -265,7 +265,11 @@ exports.LoadUtils = () => {
const msg = message.serialize();
msg.isStatusV3 = message.isStatusV3;
msg.links = (message.getLinks()).map(link => ({ link: link.href, isSuspicious: link.suspiciousCharacters?.size ? true : false}));
msg.links = (message.getLinks()).map(link => ({
link: link.href,
isSuspicious: Boolean(link.suspiciousCharacters && link.suspiciousCharacters.size)
}));
if (msg.buttons) {
msg.buttons = msg.buttons.serialize();
}