Mercurial > prosody-hg
comparison plugins/mod_pep.lua @ 9205:2e710b618440
mod_pep: Simplify code
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Sat, 18 Aug 2018 14:38:18 +0100 |
| parents | 041a731c7a62 |
| children | 07665733b332 |
comparison
equal
deleted
inserted
replaced
| 9204:c5a81acc1fc3 | 9205:2e710b618440 |
|---|---|
| 251 return current; -- no caps, could mean caps optimization, so return current | 251 return current; -- no caps, could mean caps optimization, so return current |
| 252 end | 252 end |
| 253 | 253 |
| 254 local function resend_last_item(jid, node, service) | 254 local function resend_last_item(jid, node, service) |
| 255 local ok, id, item = service:get_last_item(node, jid); | 255 local ok, id, item = service:get_last_item(node, jid); |
| 256 if not ok then return; end | 256 if not (ok and id) then return; end |
| 257 if not id then return; end | |
| 258 service.config.broadcaster("items", node, { [jid] = true }, item); | 257 service.config.broadcaster("items", node, { [jid] = true }, item); |
| 259 end | 258 end |
| 260 | 259 |
| 261 local function update_subscriptions(recipient, service_name, nodes) | 260 local function update_subscriptions(recipient, service_name, nodes) |
| 262 nodes = nodes or empty_set; | 261 nodes = nodes or empty_set; |
