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

Response Object Hierarchy #172

Closed robmoffat closed 3 years ago

robmoffat commented 3 years ago

Sometimes, we want to send responses that aren't templated. This currently isn't possible.

Maybe one implementation of Response should be TemplatedResponse or ChatWorkflowResponse?

robmoffat commented 3 years ago

Could you choose the template by using something like this:

<messageML templatename="normal.fml">askldjdlsk</messageML>

or, TemplatedResponse class which contains the template name

This might be nice if the user wants to return lots of different icons, too

robmoffat commented 3 years ago
public DataResponse(Workflow wf, Addressable stream, EntityJson data, String name, String instructions) {

this is an anti-pattern: name and instructions are too specific and never really fit what you want to do.