Mercurial > prosody-modules
changeset 6410:f45c84d98cde
mod_poke_strangers: Poke on subscription requests
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Fri, 20 Feb 2026 15:09:06 +0000 |
| parents | fb7d5c80dc40 |
| children | b00638d74f46 |
| files | mod_poke_strangers/mod_poke_strangers.lua |
| diffstat | 1 files changed, 9 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_poke_strangers/mod_poke_strangers.lua Wed Feb 18 17:01:42 2026 +0000 +++ b/mod_poke_strangers/mod_poke_strangers.lua Fri Feb 20 15:09:06 2026 +0000 @@ -50,4 +50,13 @@ module:hook("message/bare", check_subscribed, 225); module:hook("message/full", check_subscribed, 225); + +-- Check subscription requests +module:hook("presence/bare", function (event) + if event.stanza.type ~= "subscribe" then + return; + end + return check_subscribed(event); +end, 225); + -- Not hooking iqs, as that could turn into infinite loops!
