plugins/autosubscribe.lua

Mon, 17 Sep 2018 14:26:46 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Mon, 17 Sep 2018 14:26:46 +0100
changeset 150
675d296ff53f
parent 19
a698d64fc929
permissions
-rw-r--r--

Add Dockerfile


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