aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/muc
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-02-15 02:54:52 +0100
committerKim Alvefur <zash@zash.se>2018-02-15 02:54:52 +0100
commite717c8312d11271dcddb328ad80d073f54b5d177 (patch)
tree75c65a27e42bd988564c76b6e55014aed0077d77 /plugins/muc
parent42f8b3615eb02e7c823055ce186fdb3424165160 (diff)
downloadprosody-e717c8312d11271dcddb328ad80d073f54b5d177.tar.gz
prosody-e717c8312d11271dcddb328ad80d073f54b5d177.zip
MUC: Prevent traceback in case of no history items to serialize (fixes #1083)
Diffstat (limited to 'plugins/muc')
-rw-r--r--plugins/muc/muc.lib.lua2
1 files changed, 1 insertions, 1 deletions
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