RocketChat / hubot-natural

Natural Language Processing Chatbot for RocketChat
https://open.rocket.chat/channel/hubot-natural
MIT License
144 stars 44 forks source link

Decoupling from RocketChat #13

Open MatheusFaria opened 6 years ago

MatheusFaria commented 6 years ago

This project is tightly coupled with RocketChat. It would be interesting to decouple it to make sure that other adapters can use it.

diegodorgam commented 6 years ago

Would be cool, one way to do this is abstracting the adapter methods calls, in a lib file for example, where the methods could be switched according to the actual adapter in use. Although would really need a closest watching about wich method exists and each adapter to maintain it bugless. Today I think we are using the following rocketchat adapter's methods:

And we're actually using some attributes from the response object, wich is generated in the adapter too, like res.envelope.user.roomType, res.robot.alias and res.robot.name. Probably would be wise to abstract that in some object too.