Skip to content

Instantly share code, notes, and snippets.

@ro31337
Created August 3, 2014 10:19
Show Gist options
  • Save ro31337/e6e9fbe29a4d2463a4f0 to your computer and use it in GitHub Desktop.
Save ro31337/e6e9fbe29a4d2463a4f0 to your computer and use it in GitHub Desktop.
xmpp4r-simple.rb on Ruby 1.9+
...
presence = case new_presence.type
when nil
new_presence.show || :online
when :unavailable
:unavailable
else
nil
end
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment