Changeset

6106:4b15cfae2d11

plugins/muc/muc: When there's no history; return an empty iterator
author daurnimator <quae@daurnimator.com>
date Tue, 18 Mar 2014 15:42:48 -0400
parents 6105:68f53b9a186e
children 6107:5491be05b84c
files plugins/muc/muc.lib.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/muc/muc.lib.lua	Tue Mar 18 15:15:28 2014 -0400
+++ b/plugins/muc/muc.lib.lua	Tue Mar 18 15:42:48 2014 -0400
@@ -181,7 +181,7 @@
 -- 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