plugins/autosubscribe.lua@4aa787757235
plugins/autosubscribe.lua
Sun, 20 May 2018 02:16:48 +0200
- author
- Kim Alvefur <zash@zash.se>
- date
- Sun, 20 May 2018 02:16:48 +0200
- changeset 140
- 4aa787757235
- parent 19
-
a698d64fc929
- permissions
- -rw-r--r--
riddim.plugins.servercontact: Query for XEP-0157: Contact Addresses for XMPP Services
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