plugins/autosubscribe.lua@69b508f132b5
plugins/autosubscribe.lua
Sun, 05 Dec 2021 18:35:18 +0000
- author
- Matthew Wild <mwild1@gmail.com>
- date
- Sun, 05 Dec 2021 18:35:18 +0000
- changeset 164
- 69b508f132b5
- parent 19
-
a698d64fc929
- permissions
- -rw-r--r--
Import util.hashes from Prosody
This gives us a wider selection of hashes, including SHA256
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