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

Join rooms after connect? #5

Closed
agh opened this issue Feb 17, 2014 · 9 comments
Closed

Join rooms after connect? #5

agh opened this issue Feb 17, 2014 · 9 comments

Comments

@agh
Copy link

agh commented Feb 17, 2014

A hopefully quick question: what's the easiest way (your recommendation) to hook into Lita such that you can say something like the following after boot -

@lita join "My Room"

It'd be nice to be able to join/part dynamically and just have the lita_config.rb represent 'steady state' of what should happen after a restart.

Thanks for all your work on Lita to date! 🤘

@jimmycuadra
Copy link
Collaborator

Good question! This isn't really possible at the moment, but it definitely should be. I will add join/part methods to Lita::Robot and Lita::Adapter in the main gem and then implement them for this adapter.

@jimmycuadra
Copy link
Collaborator

The additions to the main gem are done. I will be releasing a new version soon, at which point I will take care of the adapter side.

@agh
Copy link
Author

agh commented Feb 19, 2014

Awesome. ✨

@jimmycuadra
Copy link
Collaborator

Completed by daea5e4.

@GaryCarneiro
Copy link

How do I go on adding Lita to a HipChat room with / without editing config file ?
( I have tried config option "config.adapter.rooms" )

@jimmycuadra
Copy link
Collaborator

That's the correct configuration option. It would look something like this:

config.adapter.rooms = %w(12345_myroom, 67890_anotherroom)

To make Lita join a room at runtime, send it the command "join 12345_myroom". Rooms joined this way are not remembered, so Lita won't automatically join them again if the process is restarted.

@GaryCarneiro
Copy link

Thanks the bot is able to join room using above config.adapter.rooms syntax.
( I had to comment config.adapter.muc_domain config too. )

Still on-the-fly joining of room is not happening. I tried all possible options .. like being in the room and issuing join command.Tried by being on 1-on-1 chat with the bot too.

I see that the command is being passed to the bot in Debug mode.

@jimmycuadra
Copy link
Collaborator

Curious... Could you open a new issue with repro steps?

@GaryCarneiro
Copy link

Sure thing.
Will do that

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

No branches or pull requests

3 participants