plugins/autosubscribe.lua@b7f628541981
plugins/autosubscribe.lua
Wed, 24 Aug 2011 12:58:39 +0200
- author
- Kim Alvefur <zash@zash.se>
- date
- Wed, 24 Aug 2011 12:58:39 +0200
- changeset 88
- b7f628541981
- parent 19
-
a698d64fc929
- permissions
- -rw-r--r--
plugins.pubsub2room: Fix to use pubsub on stream instead of bot
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