Software /
code /
prosody
Changeset
9140:415a6d26709e
mod_pep: Only resend last item on successful subscription
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 05 Aug 2018 01:53:48 +0200 |
parents | 9139:24a1e7a9d463 |
children | 9141:c1368fb756bf |
files | plugins/mod_pep.lua |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_pep.lua Mon Aug 06 18:33:33 2018 +0200 +++ b/plugins/mod_pep.lua Sun Aug 05 01:53:48 2018 +0200 @@ -362,8 +362,9 @@ end for node in nodes - current do - service:add_subscription(node, recipient, recipient, { presence = true }); - resend_last_item(recipient, node, service); + if service:add_subscription(node, recipient, recipient, { presence = true }) then + resend_last_item(recipient, node, service); + end end if nodes == empty_set or nodes:empty() then