Software /
code /
prosody
Diff
plugins/muc/muc.lib.lua @ 8519:e7808f8d7d11
MUC: Prevent traceback in case of no history items to serialize (fixes #1083)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 15 Feb 2018 02:54:52 +0100 |
parent | 8486:c50101b527bf |
child | 8526:f1a46eef9df1 |
line wrap: on
line diff
--- 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