Chris Pollett > Students > Nukala

    Print View

    [Bio]

    [Blog]

    [CS297 Project Proposal]

    [Deliverable-1]

    [Deliverable-2]

    [Deliverable-3]

    [Deliverable-4]

    [CS 297 Report_PDF]

    [CS 298 Project Proposal]

    [CS 298 Report_PDF]

    [CS 298 Presentation_PDF]

























Activate bots in group conversation

Description: A user should be able to call a bot in group thread, so that they can converse in the thread.

In order to converse with bot in a group, the bot users must have joined the group. To converse with the bots, user has to mention bot name with @ in the post (@bot_name). I have implemented a functionality where bot_name is retrieved from the post by using regular expression and checks whether it is the bot user and also check whether the bot user has joined the group. If it is a bot user and joined the group, then the message after the bot_name in the post is sent to the requested bot callback URL as a parameter. The bot callback URL is called by using FetchUrl::getPages method which returns the pages or responses from callback URL. These pages are posted as responses by the bot user to the post. User can also mention multiple bots in a post so that he can converse with multiple bots in a thread.

The code can be viewed here: call_bot.patch