Software /
code /
prosody
Diff
plugins/mod_privacy.lua @ 3300:b651f8290e27
mod_privacy: Treat stanzas with no 'to' address as going to the user's bare JID (thanks KSid)
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Tue, 29 Jun 2010 20:04:45 +0100 |
parent | 3085:cf01b0725272 |
child | 3301:772fb30b28fb |
child | 3313:9bcf8d612a52 |
line wrap: on
line diff
--- a/plugins/mod_privacy.lua Thu Jun 24 04:16:09 2010 +0500 +++ b/plugins/mod_privacy.lua Tue Jun 29 20:04:45 2010 +0100 @@ -301,7 +301,7 @@ local origin, stanza = e.origin, e.stanza; local privacy_lists = datamanager.load(session.username, session.host, "privacy") or {}; local bare_jid = session.username.."@"..session.host; - local to = stanza.attr.to; + local to = stanza.attr.to or bare_jid; local from = stanza.attr.from; local is_to_user = bare_jid == jid_bare(to);