mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-07-25 20:18:25 +02:00
Handle missing / no longer avail message
This commit is contained in:
parent
05cf2c24ca
commit
81301047b3
1 changed files with 8 additions and 1 deletions
|
@ -243,7 +243,14 @@ Message.prototype.load = function(options, cb) {
|
||||||
'WHERE message_uuid=? ' +
|
'WHERE message_uuid=? ' +
|
||||||
'LIMIT 1;',
|
'LIMIT 1;',
|
||||||
[ options.uuid ],
|
[ options.uuid ],
|
||||||
function row(err, msgRow) {
|
(err, msgRow) => {
|
||||||
|
if(err) {
|
||||||
|
return callback(err);
|
||||||
|
}
|
||||||
|
if(!msgRow) {
|
||||||
|
return callback(new Error('Message (no longer) available'));
|
||||||
|
}
|
||||||
|
|
||||||
self.messageId = msgRow.message_id;
|
self.messageId = msgRow.message_id;
|
||||||
self.areaTag = msgRow.area_tag;
|
self.areaTag = msgRow.area_tag;
|
||||||
self.messageUuid = msgRow.message_uuid;
|
self.messageUuid = msgRow.message_uuid;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue