From b21efabb68b81008daec00b627ed295bdcae6a9e Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Thu, 15 Feb 2018 02:54:52 +0100 Subject: MUC: Prevent traceback in case of no history items to serialize (fixes #1083) --- plugins/muc/muc.lib.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua index d9e9c48a..6214fa38 100644 --- a/plugins/muc/muc.lib.lua +++ b/plugins/muc/muc.lib.lua @@ -1378,7 +1378,7 @@ function room_mt:freeze(live) end end local history = self._history; - if history then + if history and history[1] ~= nil then state._last_message = st.preserialize(history[#history].stanza); state._last_message_at = history[#history].timestamp; end -- cgit v1.2.3