plugins/autosubscribe.lua

Thu, 11 Jun 2020 15:30:08 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Thu, 11 Jun 2020 15:30:08 +0100
changeset 154
30a0af8f9999
parent 19
a698d64fc929
permissions
-rw-r--r--

Dockerfile: Update (now works)


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

mercurial