Mercurial > prosody-hg
comparison plugins/mod_pubsub.lua @ 5419:e28fca8faf62
mod_pubsub: Don't send current items to new subscribers (I don't know why we did)
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Wed, 03 Apr 2013 13:51:59 +0100 |
| parents | 518d864b2ab8 |
| children | 92615cfa2270 |
comparison
equal
deleted
inserted
replaced
| 5418:7f270fbf3361 | 5419:e28fca8faf62 |
|---|---|
| 162 end | 162 end |
| 163 else | 163 else |
| 164 reply = pubsub_error_reply(stanza, ret); | 164 reply = pubsub_error_reply(stanza, ret); |
| 165 end | 165 end |
| 166 origin.send(reply); | 166 origin.send(reply); |
| 167 if ok then | |
| 168 -- Send all current items | |
| 169 local ok, items = service:get_items(node, stanza.attr.from); | |
| 170 if items then | |
| 171 local jids = { [jid] = options or true }; | |
| 172 for id, item in pairs(items) do | |
| 173 service.config.broadcaster("items", node, jids, item); | |
| 174 end | |
| 175 end | |
| 176 end | |
| 177 end | 167 end |
| 178 | 168 |
| 179 function handlers.set_unsubscribe(origin, stanza, unsubscribe) | 169 function handlers.set_unsubscribe(origin, stanza, unsubscribe) |
| 180 local node, jid = unsubscribe.attr.node, unsubscribe.attr.jid; | 170 local node, jid = unsubscribe.attr.node, unsubscribe.attr.jid; |
| 181 if not (node and jid) then | 171 if not (node and jid) then |
