plugins/autosubscribe.lua

Thu, 22 Oct 2020 15:37:43 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Thu, 22 Oct 2020 15:37:43 +0100
changeset 161
c4df517edbc1
parent 19
a698d64fc929
permissions
-rw-r--r--

config.docker.lua: Require RIDDIM_DEBUG=1 to enable debug mode


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