# HG changeset patch # User Kim Alvefur # Date 1533426828 -7200 # Node ID 415a6d26709ef52eeba0c165a41744f78883dc61 # Parent 24a1e7a9d463e9540752e3388cfd2934a658f1eb mod_pep: Only resend last item on successful subscription diff -r 24a1e7a9d463 -r 415a6d26709e plugins/mod_pep.lua --- 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