Frames received via FTN packets, tags are not set, so we'll use the 'to' user

This commit is contained in:
Deon George 2024-01-02 22:41:50 +11:00
parent 0625691ae5
commit dd1fef6f98
2 changed files with 11 additions and 6 deletions

View File

@ -971,11 +971,12 @@ function Page(debug) {
} }
var msg; var msg;
// Find existing message with the page number and delete it if defined // Find existing message with the page number
for(var x in headers) { for(var x in headers) {
if ((headers[x].tags === page.toString()) && (!(headers[x].attr&MSG_DELETE)) && (headers[x].from === SESSION_EXT)) { if ((!(headers[x].attr&MSG_DELETE)) && (headers[x].to === page.toString()) && (headers[x].from === SESSION_EXT)) {
msg = headers[x]; msg = headers[x];
break; //break; @todo We'll take the last one that matches, if there are more than one.
// @todo In the case of frames coming via FTN packets, we are not currently deleting old entries
} }
} }

View File

@ -32,6 +32,10 @@ switch (ext) {
} }
var page = new Page(); var page = new Page();
page.get(new PageObject(frame,index)); if (page.get(new PageObject(frame,index))) {
page.import(file,ext); page.import(file,ext);
page.save(); page.save();
} else {
throw new Error('Page '+frame+index+' doesnt exist?');
}