# HG changeset patch # User daurnimator # Date 1395171768 14400 # Node ID 4b15cfae2d11a2273ffc4c1a670750a23c03c0b3 # Parent 68f53b9a186ee3309e2fc1daa1ec90e772751066 plugins/muc/muc: When there's no history; return an empty iterator diff -r 68f53b9a186e -r 4b15cfae2d11 plugins/muc/muc.lib.lua --- 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