Software / code / prosody
Comparison
plugins/mod_register.lua @ 5024:d25e1b9332cc
Merge with Florob
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Sat, 28 Jul 2012 01:14:31 +0100 |
| parent | 5014:b2006c1cfa85 |
| child | 5096:50a64fd79c07 |
comparison
equal
deleted
inserted
replaced
| 5023:dcc8e789df36 | 5024:d25e1b9332cc |
|---|---|
| 118 datamanager.list_store(username, host, "offline", nil); | 118 datamanager.list_store(username, host, "offline", nil); |
| 119 local bare = username.."@"..host; | 119 local bare = username.."@"..host; |
| 120 for jid, item in pairs(roster) do | 120 for jid, item in pairs(roster) do |
| 121 if jid and jid ~= "pending" then | 121 if jid and jid ~= "pending" then |
| 122 if item.subscription == "both" or item.subscription == "from" or (roster.pending and roster.pending[jid]) then | 122 if item.subscription == "both" or item.subscription == "from" or (roster.pending and roster.pending[jid]) then |
| 123 core_post_stanza(hosts[host], st.presence({type="unsubscribed", from=bare, to=jid})); | 123 module:send(st.presence({type="unsubscribed", from=bare, to=jid})); |
| 124 end | 124 end |
| 125 if item.subscription == "both" or item.subscription == "to" or item.ask then | 125 if item.subscription == "both" or item.subscription == "to" or item.ask then |
| 126 core_post_stanza(hosts[host], st.presence({type="unsubscribe", from=bare, to=jid})); | 126 module:send(st.presence({type="unsubscribe", from=bare, to=jid})); |
| 127 end | 127 end |
| 128 end | 128 end |
| 129 end | 129 end |
| 130 datamanager.store(username, host, "roster", nil); | 130 datamanager.store(username, host, "roster", nil); |
| 131 datamanager.store(username, host, "privacy", nil); | 131 datamanager.store(username, host, "privacy", nil); |