Software /
code /
prosody
Diff
plugins/muc/history.lib.lua @ 7350:24e2369b67f9
MUC: Move history to room._history
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 12 Apr 2016 19:35:55 +0200 |
parent | 7086:6cc7c9da29ed |
child | 7401:e16b3fd0bd80 |
line wrap: on
line diff
--- a/plugins/muc/history.lib.lua Fri Apr 08 17:54:50 2016 +0200 +++ b/plugins/muc/history.lib.lua Tue Apr 12 19:35:55 2016 +0200 @@ -79,7 +79,7 @@ module:hook("muc-get-history", function(event) local room = event.room; - local history = room._data["history"]; -- send discussion history + local history = room._history; -- send discussion history if not history then return nil end local history_len = #history; @@ -140,8 +140,8 @@ local historic = event.stanza:get_child("body"); if historic then local room = event.room - local history = room._data["history"]; - if not history then history = {}; room._data["history"] = history; end + local history = room._history; + if not history then history = {}; room._history = history; end local stanza = st.clone(event.stanza); stanza.attr.to = ""; local ts = gettime();