Only export private messages if the user has elected to do so
This commit is contained in:
parent
9174b7b710
commit
a56546cf3f
|
@ -307,12 +307,16 @@ exports.getModule = class MessageBaseQWKExport extends MenuModule {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
err => {
|
err => {
|
||||||
return callback(err);
|
return callback(err, userExportAreas);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
(callback) => {
|
(userExportAreas, callback) => {
|
||||||
// private messages to current user
|
// Private messages to current user if the user has
|
||||||
// :TODO: Only if user property has private area tag
|
// elected to export private messages
|
||||||
|
if (!(userExportAreas.find(exportArea => exportArea.areaTag === Message.WellKnownAreaTags.Private))) {
|
||||||
|
return callback(null);
|
||||||
|
}
|
||||||
|
|
||||||
const filter = {
|
const filter = {
|
||||||
resultType : 'id',
|
resultType : 'id',
|
||||||
privateTagUserId : this.client.user.userId,
|
privateTagUserId : this.client.user.userId,
|
||||||
|
@ -352,7 +356,7 @@ exports.getModule = class MessageBaseQWKExport extends MenuModule {
|
||||||
|
|
||||||
// :TODO: something like this: allow to override the displayed/downloaded as filename
|
// :TODO: something like this: allow to override the displayed/downloaded as filename
|
||||||
// separate from the actual on disk filename. E.g. we could always download as "ENIGMA.QWK"
|
// separate from the actual on disk filename. E.g. we could always download as "ENIGMA.QWK"
|
||||||
visible_filename : paths.basename(packetInfo.path),
|
//visible_filename : paths.basename(packetInfo.path),
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue