Frames received via FTN packets may have origin and tag lines.

This commit is contained in:
Deon George 2024-01-02 23:56:47 +11:00
parent dd1fef6f98
commit 8be89799ce

View File

@ -987,9 +987,24 @@ function Page(debug) {
} else {
log(LOG_DEBUG,'|- Loading frame: ['+page.toString()+'] from msgbase ['+msg.number+']');
var contents = JSON.parse(mb.get_msg_body(false,msg.number,false,false,true,true));
var contents = mb.get_msg_body(false,msg.number,false,false,true,true).split("\r\n");
return this.preload(contents,SESSION_EXT);
var i;
for (i=0; i<contents.length; i++) {
// Echomail tag line
if (contents[i] === '---' || contents[i].substring(0,4) === '--- ')
break;
}
contents.length = i;
try {
var result = JSON.parse(contents.join(''));
} catch(e) {
alert('Error ' + e + ' parsing JSON');
}
return this.preload(result,SESSION_EXT);
}
return false;