Mercurial > prosody-modules
diff mod_pubsub_feeds/mod_pubsub_feeds.lua @ 2422:57235bce06fc
mod_pubsub_feeds: Always approve unsubscription from unknown feeds
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 19 Dec 2016 07:49:12 +0100 |
parents | a9add2d1adf5 |
children | 1b6027ef5191 |
line wrap: on
line diff
--- a/mod_pubsub_feeds/mod_pubsub_feeds.lua Mon Dec 19 07:48:48 2016 +0100 +++ b/mod_pubsub_feeds/mod_pubsub_feeds.lua Mon Dec 19 07:49:12 2016 +0100 @@ -217,6 +217,11 @@ local feed = feed_list[query.node]; if not feed then + if query["hub.mode"] == "unsubscribe" then + -- Unsubscribe from unknown feed + module:log("debug", "Unsubscribe from unknown feed %s -- %s", query["hub.topic"], formencode(query)); + return query["hub.challenge"]; + end module:log("debug", "Push for unknown feed %s -- %s", query["hub.topic"], formencode(query)); return 404; end