plugins/autosubscribe.lua@9245b1d8a818
plugins/autosubscribe.lua
Mon, 17 Sep 2018 14:14:58 +0100
- author
- Matthew Wild <mwild1@gmail.com>
- date
- Mon, 17 Sep 2018 14:14:58 +0100
- changeset 148
- 9245b1d8a818
- parent 19
-
a698d64fc929
- permissions
- -rw-r--r--
init.lua: Update for Lua 5.2 (only)
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