Skip to content

Instantly share code, notes, and snippets.

@jheth
Created July 11, 2012 04:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jheth/3087896 to your computer and use it in GitHub Desktop.
Save jheth/3087896 to your computer and use it in GitHub Desktop.
Jabber Subscription Request Callback
lib/jabber/bot.rb
204,208d203
< @jabber.roster.add_subscription_request_callback do |item,pres|
< @jabber.roster.accept_subscription(pres.from)
< puts 'accepted request from ' + pres.from.to_s
< end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment