plugins/autosubscribe.lua

Sun, 20 May 2018 03:14:32 +0200

author
Kim Alvefur <zash@zash.se>
date
Sun, 20 May 2018 03:14:32 +0200
changeset 142
211fa13c7ca2
parent 19
a698d64fc929
permissions
-rw-r--r--

riddim.plugins.pubsub2room: Don't create an invalid stanza with an empty name

Caught by sanity checks in util.stanza from Prosody trunk


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