finos / spring-bot

Spring Boot + Java Integration for Symphony/Teams Chat Platform Bots and Apps
https://springbot.finos.org
Apache License 2.0
60 stars 35 forks source link

Single method invoke on multiple chat button #416

Closed vaibhav-db closed 3 months ago

vaibhav-db commented 1 year ago

Single method invoke on multiple chat button

Description of Problem:

...Currently we have one to one mapping with chat button and its method e.g. for poll bot, all poll option we have created separate methods, instant of we can used single method and depend up the button text we will act.

Potential Solutions:

We will create ChatButtonWorkflowResolverFactory similar to ChatVariableWorkflowResolverFactory and pass ChatButton reference to method parameter.

robmoffat commented 1 year ago

Hi @vaibhav-db,

I'm not sure what this problem is about - what is the underlying issue?

robmoffat commented 1 year ago

From discussion the idea of this would be a non-static approach to dispatching the action. i.e when the user clicks a button, we could pass the label of the button into a method call.

This would mean that we could dynamically create buttons according to the need, rather than statically defining them in the code.