Software /
code /
prosody
Changeset
4231:a99f82db692a
mod_privacy: Remove unused function, sendUnavailable
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Tue, 29 Mar 2011 14:57:50 +0100 |
parents | 4230:23b68616b6d8 |
children | 4232:582fe508214f |
files | plugins/mod_privacy.lua |
diffstat | 1 files changed, 0 insertions(+), 22 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_privacy.lua Tue Mar 29 14:10:00 2011 +0100 +++ b/plugins/mod_privacy.lua Tue Mar 29 14:57:50 2011 +0100 @@ -45,28 +45,6 @@ end end -function sendUnavailable(origin, to, from) ---[[ example unavailable presence stanza -<presence from="node@host/resource" type="unavailable" to="node@host" > - <status>Logged out</status> -</presence> -]]-- - local presence = st.presence({from=from, type="unavailable"}); - presence:tag("status"):text("Logged out"); - - local node, host = jid_bare(to); - local bare = node .. "@" .. host; - - local user = bare_sessions[bare]; - if user then - for resource, session in pairs(user.sessions) do - presence.attr.to = session.full_jid; - module:log("debug", "send unavailable to: %s; from: %s", tostring(presence.attr.to), tostring(presence.attr.from)); - origin.send(presence); - end - end -end - function declineList(privacy_lists, origin, stanza, which) if which == "default" then if isAnotherSessionUsingDefaultList(origin) then