From d225d78fa961d8839d0f8d36280815e9111a10d6 Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Tue, 9 Jan 2018 19:38:36 -0700 Subject: [PATCH] At least for now, use FTN-compliant MSGID for NetMail exports --- core/ftn_util.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/core/ftn_util.js b/core/ftn_util.js index a02d8e1c..39093fab 100644 --- a/core/ftn_util.js +++ b/core/ftn_util.js @@ -135,9 +135,20 @@ function getMessageSerialNumber(messageId) { // // ENiGMA½: .@<5dFtnAddress> // -function getMessageIdentifier(message, address) { +// 0.0.8-alpha: +// Made compliant with FTN spec *when exporting NetMail* due to +// Mystic rejecting messages with the true-unique version. +// Strangely, Synchronet uses the unique format and Mystic does +// OK with it. Will need to research further. Note also that +// g00r00 was kind enough to fix Mystic to allow for the Sync/Enig +// format, but that will only help when using newer Mystic versions. +// +function getMessageIdentifier(message, address, isNetMail = false) { const addrStr = new Address(address).toString('5D'); - return `${message.messageId}.${message.areaTag.toLowerCase()}@${addrStr} ${getMessageSerialNumber(message.messageId)}`; + return isNetMail ? + `${addrStr} ${getMessageSerialNumber(message.messageId)}` : + `${message.messageId}.${message.areaTag.toLowerCase()}@${addrStr} ${getMessageSerialNumber(message.messageId)}` + ; } //