# HG changeset patch # User Kim Alvefur # Date 1518659692 -3600 # Node ID e7808f8d7d11e495970b6b637bf221136cb3502a # Parent 0de0018bdf91defb3fcfb578f9da5ce26017d052 MUC: Prevent traceback in case of no history items to serialize (fixes #1083) diff -r 0de0018bdf91 -r e7808f8d7d11 plugins/muc/muc.lib.lua --- a/plugins/muc/muc.lib.lua Sun Feb 04 01:40:11 2018 +0100 +++ b/plugins/muc/muc.lib.lua Thu Feb 15 02:54:52 2018 +0100 @@ -1378,7 +1378,7 @@ 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