Very slight display improvements, include conf in info
This commit is contained in:
parent
fbec46d1b9
commit
f63464c501
|
@ -4,6 +4,7 @@ const Message = require('./message');
|
|||
const { Errors } = require('./enig_error');
|
||||
const {
|
||||
getMessageAreaByTag,
|
||||
getMessageConferenceByTag,
|
||||
hasMessageConfAndAreaRead,
|
||||
getAllAvailableMessageAreaTags,
|
||||
} = require('./message_area');
|
||||
|
@ -216,7 +217,7 @@ exports.getModule = class MessageBaseQWKExport extends MenuModule {
|
|||
message,
|
||||
step : 'message',
|
||||
total : messageIds.length,
|
||||
status : `Writing message ${current} / ${messageIds.length}`,
|
||||
status : `${_.truncate(message.subject, { length : 25 })} (${current} / ${messageIds.length})`,
|
||||
};
|
||||
|
||||
progressHandler(progress, err => {
|
||||
|
@ -276,7 +277,8 @@ exports.getModule = class MessageBaseQWKExport extends MenuModule {
|
|||
});
|
||||
async.eachSeries(userExportAreas, (exportArea, nextExportArea) => {
|
||||
const area = getMessageAreaByTag(exportArea.areaTag);
|
||||
if (!area) {
|
||||
const conf = getMessageConferenceByTag(area.confTag);
|
||||
if (!area || !conf) {
|
||||
// :TODO: remove from user properties - this area does not exist
|
||||
this.client.log.warn({ areaTag : exportArea.areaTag }, 'Cannot QWK export area as it does not exist');
|
||||
return nextExportArea(null);
|
||||
|
@ -288,9 +290,10 @@ exports.getModule = class MessageBaseQWKExport extends MenuModule {
|
|||
}
|
||||
|
||||
const progress = {
|
||||
conf,
|
||||
area,
|
||||
step : 'next_area',
|
||||
status : `Gathering messages in ${area.name}...`,
|
||||
status : `Gathering in ${conf.name} - ${area.name}...`,
|
||||
};
|
||||
|
||||
progressHandler(progress, err => {
|
||||
|
|
|
@ -5,6 +5,7 @@ const { splitTextAtTerms } = require('./string_util');
|
|||
const {
|
||||
getMessageConfTagByAreaTag,
|
||||
getMessageAreaByTag,
|
||||
getMessageConferenceByTag,
|
||||
getAllAvailableMessageAreaTags,
|
||||
} = require('./message_area');
|
||||
const StatLog = require('./stat_log');
|
||||
|
@ -1370,10 +1371,9 @@ class QWKPacketWriter extends EventEmitter {
|
|||
// map areas as conf #\r\nDescription\r\n pairs
|
||||
areas.forEach(area => {
|
||||
const conferenceNumber = this._getMessageConferenceNumberByAreaTag(area.areaTag);
|
||||
let desc = area.name;
|
||||
if (area.desc) {
|
||||
desc += ` - ${area.desc}`
|
||||
}
|
||||
const conf = getMessageConferenceByTag(area.confTag);
|
||||
const desc = `${conf.name} - ${area.name}`;
|
||||
|
||||
controlStream.write(`${conferenceNumber}\r\n`);
|
||||
controlStream.write(`${desc}\r\n`);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue