mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-07-30 22:46:17 +02:00
* Minor changes & cleanup
This commit is contained in:
parent
79e533468a
commit
4cf10ba85c
5 changed files with 23 additions and 5 deletions
|
@ -73,6 +73,25 @@ function changeCurrentArea(client, areaId, cb) {
|
|||
client.user.persistProperty('message_area_id', areaId, function persisted(err) {
|
||||
callback(err);
|
||||
});
|
||||
},
|
||||
function cacheAreaName(callback) {
|
||||
msgDb.get(
|
||||
'SELECT area_name ' +
|
||||
'FROM message_area ' +
|
||||
'WHERE area_id=? ' +
|
||||
'LIMIT 1;',
|
||||
[ areaId ],
|
||||
function got(err, row) {
|
||||
// note: failures here are non-fatal
|
||||
if(err) {
|
||||
callback(null);
|
||||
} else {
|
||||
client.user.persistProperty('message_area_name', row.area_name, function persisted(err) {
|
||||
callback(null);
|
||||
});
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
],
|
||||
function complete(err) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue