From 176fc76253fd26bca5efc0249b3666feb40ddf99 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Tue, 18 Mar 2014 15:42:48 -0400 Subject: plugins/muc/muc: When there's no history; return an empty iterator --- plugins/muc/muc.lib.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/muc') diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua index 0c87574a..2afe6f58 100644 --- a/plugins/muc/muc.lib.lua +++ b/plugins/muc/muc.lib.lua @@ -181,7 +181,7 @@ end -- Get history for 'to' function room_mt:get_history(to, maxchars, maxstanzas, since) local history = self._data['history']; -- send discussion history - if not history then return end + if not history then return function() end end local history_len = #history maxstanzas = maxstanzas or history_len -- cgit v1.2.3