plugins/autosubscribe.lua

Tue, 24 Aug 2021 11:31:38 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Tue, 24 Aug 2021 11:31:38 +0100
changeset 163
999573fb51ab
parent 19
a698d64fc929
permissions
-rw-r--r--

plugins.eliza: Strip all trailing whitespace from responses


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