plugins/autosubscribe.lua

Thu, 23 Mar 2023 09:54:45 +0000

author
Matthew Wild <mwild1@gmail.com>
date
Thu, 23 Mar 2023 09:54:45 +0000
changeset 174
56316e345595
parent 19
a698d64fc929
permissions
-rw-r--r--

squishy: Add missing servercontact plugin


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