diff options
author | daurnimator <quae@daurnimator.com> | 2014-03-19 13:57:02 -0400 |
---|---|---|
committer | daurnimator <quae@daurnimator.com> | 2014-03-19 13:57:02 -0400 |
commit | 0019bfd631209ffd73380b8f52f6d8003da2f518 (patch) | |
tree | 2f8a307da6b9935148d1a8099d9495ec02e5a2ef /plugins/muc/muc.lib.lua | |
parent | d986769600d4a588e7af9e910810475c0bef1031 (diff) | |
download | prosody-0019bfd631209ffd73380b8f52f6d8003da2f518.tar.gz prosody-0019bfd631209ffd73380b8f52f6d8003da2f518.zip |
plugins/muc/muc.lib: Use module.host where `muc_domain` was previously
Diffstat (limited to 'plugins/muc/muc.lib.lua')
-rw-r--r-- | plugins/muc/muc.lib.lua | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua index 972e30cb..f3d69f8d 100644 --- a/plugins/muc/muc.lib.lua +++ b/plugins/muc/muc.lib.lua @@ -25,7 +25,6 @@ local setmetatable = setmetatable; local base64 = require "util.encodings".base64; local md5 = require "util.hashes".md5; -local muc_domain = nil; --module:get_host(); local default_history_length, max_history_length = 20, math.huge; ------------ @@ -118,8 +117,8 @@ function room_mt:save_to_history(stanza) stanza = st.clone(stanza); stanza.attr.to = ""; local stamp = datetime.datetime(); - stanza:tag("delay", {xmlns = "urn:xmpp:delay", from = muc_domain, stamp = stamp}):up(); -- XEP-0203 - stanza:tag("x", {xmlns = "jabber:x:delay", from = muc_domain, stamp = datetime.legacy()}):up(); -- XEP-0091 (deprecated) + stanza:tag("delay", {xmlns = "urn:xmpp:delay", from = module.host, stamp = stamp}):up(); -- XEP-0203 + stanza:tag("x", {xmlns = "jabber:x:delay", from = module.host, stamp = datetime.legacy()}):up(); -- XEP-0091 (deprecated) local entry = { stanza = stanza, stamp = stamp }; t_insert(history, entry); while #history > (self._data.history_length or default_history_length) do t_remove(history, 1) end |