ibm-cloud-solutions / hubot-ibmcloud-nlc

Adds a framework to enable Natural Language interactions in your Hubot scripts
http://www.ibm.com/
Other
11 stars 1 forks source link

Improve situations when bots could potentially talk to each other by checking for isBot flag #63

Closed CiaranHannigan closed 8 years ago

CiaranHannigan commented 8 years ago

We fixed the issue where a bot would respond if their name is mentioned, but not addressed.

There might still be an edge case where a user communicating with multiple bots at once, could trigger the bots to start talking to each other. So we need to ensure that we can nip that in the bud before it falls into an endless loop.

The flag isBot in the res object would be a good candidate for that.

CiaranHannigan commented 8 years ago
User {
        _properties: [Object],
        _modelName: 'User',
        id: '*****',
        team_id: '*****',
        name: 'ciaran',
        deleted: false,
        status: null,
        color: 'e85d72',
        real_name: 'CIARAN HANNIGAN',
        tz: 'America/Indiana/Indianapolis',
        tz_label: 'Eastern Daylight Time',
        tz_offset: -14400,
        profile: [Object],
        is_admin: false,
        is_owner: false,
        is_primary_owner: false,
        is_restricted: false,
        is_ultra_restricted: false,
        is_bot: false,
        presence: 'active',
        room: '*****' }
CiaranHannigan commented 8 years ago

Right now our mocha tests do not cover multiple bots in a single chat room, so this will likely need to be tested in the wild.