RocketChat / Apps.Rasa

Integration between Rocket.Chat and the RASA Chatbot platform
17 stars 11 forks source link

why define so much message type? #17

Open xkungfu opened 3 years ago

xkungfu commented 3 years ago

IMessage is already defined by Rocket.chat. Why not use? and define two new type IRasaMessage, ILivechatMessage for AppsRasa.

murtaza98 commented 3 years ago

@xkungfu

ILivechatMessage interface is designed by the apps-engine specifically for Livechat room message. This is because Livechat Room Message contains some extra info (eg visitor-token). Also if u notice, ILivechatMessage extends IMessage.

Regarding IRasaMessage, this is an interface which based on the definitions of Rasa API. One can consider this as an intermediary interface since at the end we are converting this into IMessage

I hope this answers your question :slightly_smiling_face: