Skip to content

Topic switch does not work during coversation #375

@alexraj

Description

@alexraj

When the topic is switched, and the first gambit is a conversation, it always matches the first topic, rather than switched topic. Consider the following gambits.

+ I love animals
- Me too {topic=animals}
+ I love pets
- Me too {topic=pets}

> topic animals {keep}
  + My favorite is cats
  - cats are scary
< topic
> topic pets {keep}
  + My favorite is cats
  - cats are fun!!
< topic

and

+ I love animals
- Me too, what is your favorite? {topic=animals}
+ I love pets
- Me too, what is your favorite? {topic=pets}
> topic animals {keep}
  + *1
  % * what is your favorite? *
  - <cap1> are scary
< topic
> topic pets {keep}
  + *1
  % * what is your favorite? *
  - <cap1> are fun!!
< topic

Expected Behavior
The first one works as expected. The conversation is as follows.
Bot> Hi, How can I help you?
You> i love pets
Bot> Me too
You> my favorite is cats
Bot> cats are fun!!

For the second one, it always matches the "animals" topic. It should say "cats are fun!!" as a last reply. The conversation is as follows.

Bot> Hi, How can I help you?
You> I love pets
Bot> Me too, what is your favorite?
You> cats
Bot> cats are scary

Current Behavior
The topic switch doesn't happen, and it matches the first one irrespective of topic, instead of matching the current topic, which is "pets"
Steps to Reproduce (for bugs)
Try out the two sets of Gambits.

Context
We are creating a chatops, where the first question asks for environment, the rest of the conversation depends on the first question, that determines the topic.

Your Environment

  • Version used: Latest
  • Environment name and version (e.g. PHP 5.4 on nginx 1.9.1):
  • Server type and version:
  • Operating System and version: Windows
  • Link to your project:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions