Skip to content
This repository has been archived by the owner on Jun 30, 2022. It is now read-only.

Message on join/leave? #28

Open
scalp42 opened this issue Sep 9, 2015 · 1 comment
Open

Message on join/leave? #28

scalp42 opened this issue Sep 9, 2015 · 1 comment

Comments

@scalp42
Copy link

scalp42 commented Sep 9, 2015

Hi @jimmycuadra

How would someone go about sending a message when a person join or leave a room ?

Thanks in advance for the help

@jimmycuadra
Copy link
Collaborator

Not possible currently, but not too difficult to add support for. lita-hipchat would need to hook into the on_join and on_leave methods of Jabber::MUC::SimpleMUCClient from the xmpp4r library: https://github.com/xmpp4r/xmpp4r/blob/4be950b6f6915de30f2550478308869495f54e45/lib/xmpp4r/muc/helper/simplemucclient.rb. When joining a room, callbacks would be registered with these methods similar to the existing register_muc_message_callback method: https://github.com/jimmycuadra/lita-hipchat/blob/e4958ecbb570db7e8d0deffb21722518f93f1d90/lib/lita/adapters/hipchat/connector.rb. The callbacks would then trigger events on Lita's robot object that handlers could use.

If you want to take a stab at implementing this, I'd be happy to accept a PR! Otherwise I'll leave the issue open as a feature request. Thanks for your interest!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants