Software /
code /
prosody-modules
Changeset
222:6e6a08b0531a
mod_archive: minor fix.
author | shinysky<shinysky1986(AT)gmail.com> |
---|---|
date | Sun, 25 Jul 2010 18:18:26 +0800 |
parents | 221:1861290055c0 |
children | 223:de71a52fc63a |
files | mod_archive/mod_archive.lua |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_archive/mod_archive.lua Sun Jul 25 01:44:57 2010 +0800 +++ b/mod_archive/mod_archive.lua Sun Jul 25 18:18:26 2010 +0800 @@ -18,6 +18,8 @@ local FORCE_ARCHIVING = false; local AUTO_ARCHIVING_ENABLED = true; +local HOST = 'localhost'; + module:add_feature("urn:xmpp:archive"); module:add_feature("urn:xmpp:archive:auto"); module:add_feature("urn:xmpp:archive:manage"); @@ -696,10 +698,10 @@ local from_node, from_host = jid.split(stanza.attr.from); local to_node, to_host = jid.split(stanza.attr.to); -- FIXME only archive messages of users on this host - if from_host == "localhost" and apply_pref(from_node, from_host, stanza.attr.to, thread) then + if from_host == HOST and apply_pref(from_node, from_host, stanza.attr.to, thread) then store_msg(stanza, from_node, from_host, true); end - if to_host == "localhost" and apply_pref(to_node, to_host, stanza.attr.from, thread) then + if to_host == HOST and apply_pref(to_node, to_host, stanza.attr.from, thread) then store_msg(stanza, to_node, to_host, false); end end