Node.js based forum software built for the modern web
if there are no messages pass empty array
barisusaklia3dc427e671c
diff --git a/src/messaging.js b/src/messaging.jsindex b560bbb989..444dfb2496 100644--- a/src/messaging.js+++ b/src/messaging.js@@ -151,7 +151,7 @@ var async = require('async'),});next(undefined, messages);- } else {+ } else if (messages.length === 1) {// For single messages, we don't know the context, so look up the previous message and comparevar key = 'uid:' + uid + ':chat:room:' + roomId + ':mids';async.waterfall([@@ -183,6 +183,8 @@ var async = require('async'),next(undefined, messages);});+ } else {+ next(null, []);}}], callback);