Software / code / prosody
Comparison
plugins/mod_pubsub.lua @ 5317:86fab046813f
mod_pubsub: Broadcast items correctly on new subscriptions
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Mon, 28 Jan 2013 01:06:05 +0100 |
| parent | 5314:e5e480d73066 |
| child | 5318:989acb4ad1de |
comparison
equal
deleted
inserted
replaced
| 5316:310c7e5bb906 | 5317:86fab046813f |
|---|---|
| 141 -- Send all current items | 141 -- Send all current items |
| 142 local ok, items = service:get_items(node, stanza.attr.from); | 142 local ok, items = service:get_items(node, stanza.attr.from); |
| 143 if items then | 143 if items then |
| 144 local jids = { [jid] = options or true }; | 144 local jids = { [jid] = options or true }; |
| 145 for id, item in pairs(items) do | 145 for id, item in pairs(items) do |
| 146 service.config.broadcaster(node, jids, item); | 146 service.config.broadcaster("items", node, jids, item); |
| 147 end | 147 end |
| 148 end | 148 end |
| 149 end | 149 end |
| 150 end | 150 end |
| 151 | 151 |