jbot icon indicating copy to clipboard operation
jbot copied to clipboard

External contorller for bot

Open tsergey-tm opened this issue 7 years ago • 4 comments

Fixes #81. Added ability to register other beans as bot controller.

Some little fixes:

  • Performance: pattern compiled only once
  • Controllers methods check for compatibility on startup

tsergey-tm avatar Dec 08 '17 06:12 tsergey-tm

Firstly, thanks a lot for contributing. I haven't thoroughly looked into your PR yet but after giving it a brief look I would like to know what you think of registering different classes via annotation?

rampatra avatar Dec 12 '17 17:12 rampatra

Sorry for my english. :)

In the beginning, I thought that it was more correct to make a registration with a controller, since there might be several bots in the application. The code is ready for this.

Now I understand that it's not right to do several bots of the same class.

There remains a problem when it is not clear to which bot to bind the handler. I think it will be enough to make the @handler annotation in which the parameter will indicate the list of bot classes to which the handler can be bound. And if the list is empty, then the handler will be bound to all the bots.

I'll try to do it tonight.

tsergey-tm avatar Dec 13 '17 03:12 tsergey-tm

This looks to be a great addition to the bot framework. Beyond the merge conflicts is there anything we can do to help this pull request along?

Ravesty avatar Apr 09 '18 20:04 Ravesty

@Ravesty thanks for reaching out. I actually have thought to achieve this in a slightly different approach, so I have to edit this PR before merging. Moreover, I also need to update the documentation to make this PR ready.

rampatra avatar Apr 10 '18 12:04 rampatra