I am creating a chat platform where I need to create channel adapters for facebook, slack, whatsApp etc. I need to support incoming chats from all these channels and there may be many more. Now, all I can find out over the internet is that webhooks play a central role in on boarding channels but I am unable to figure out how it all works out end to end and what design considerations should I keep in mind while designing this system/adapters
I figured I would have to provide webhook where channel users would be posting their chats but at the same time adapter would have to get webhook url of that channel as well so that messages from the platform can be sent to the user. For eg if user1 sends a message from slack using platform's webhhok, some other user can reply to him using his slack webhook.
But this way I would have to maintain a highly available cache service as well as data store that would maintain this mapping for this user <==> slack-webhook <==> platform-webhook
Is it the right way of doing it? If no, is there some industry standard way of doing it? Any help/feedback would be appreciated
Aucun commentaire:
Enregistrer un commentaire