aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/muc/history.lib.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2016-04-12 19:35:55 +0200
committerKim Alvefur <zash@zash.se>2016-04-12 19:35:55 +0200
commit0e905606b9bf28b8744ec13bcf586678d247a027 (patch)
treeb27f8273dc93524710b2f58e100be3b7d86679f2 /plugins/muc/history.lib.lua
parent7f668a8d577b71115bf3193b7c34bee75b61fdf1 (diff)
downloadprosody-0e905606b9bf28b8744ec13bcf586678d247a027.tar.gz
prosody-0e905606b9bf28b8744ec13bcf586678d247a027.zip
MUC: Move history to room._history
Diffstat (limited to 'plugins/muc/history.lib.lua')
-rw-r--r--plugins/muc/history.lib.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/muc/history.lib.lua b/plugins/muc/history.lib.lua
index 6fdef96f..0fc0dfa3 100644
--- a/plugins/muc/history.lib.lua
+++ b/plugins/muc/history.lib.lua
@@ -79,7 +79,7 @@ end
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 @@ module:hook("muc-add-history", function(event)
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();