plugins/autosubscribe.lua@e545ba65c9ef
plugins/autosubscribe.lua
Thu, 31 May 2018 00:59:20 +0200
- author
- Kim Alvefur <zash@zash.se>
- date
- Thu, 31 May 2018 00:59:20 +0200
- changeset 146
- e545ba65c9ef
- parent 19
-
a698d64fc929
- permissions
- -rw-r--r--
riddim.plugins.pubsub2room: Add support for extracting data from JSON Containers (XEP-0335)
function riddim.plugins.autosubscribe(bot)
bot:hook("presence", function (presence)
if presence.stanza.attr.type ~= 'subscribe' then return nil; end
bot:send_presence(presence.sender.jid, 'subscribed');
return false;
end);
end