Is your feature request related to a problem? Please describe.
Currently, Dialogflow as a connector is only reading from "Airy Chat Plugin". As an Airy user, i need to enable Dialogflow when installed on all my "Active" connected sources connected to Airy.
Describe the solution you'd like
-
Add the following case switch to read different sources Metadata ondialogflow-connector:
if (text != "") {
final ObjectNode node = getNode();
switch (source) {
case "google": {
final ObjectNode representative = getNode();
representative.put("representativeType", "BOT");
node.set("representative", representative);
node.put("text", text);
return mapper.writeValueAsString(node);
}
case "viber": {
node.put("text", text);
node.put("type", "text");
return mapper.writeValueAsString(node);
}
case "chatplugin":
case "instagram":
case "facebook": {
node.put("text", text);
return mapper.writeValueAsString(node);
}
case "twilio.sms":
case "twilio.whatsapp": {
node.put("Body", text);
return mapper.writeValueAsString(node);
}
case "whatsapp": {
node.put("Body", text);
return mapper.writeValueAsString(node);
}
default: {
return null;
}
}
}
## Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
## Additional context
Add any other context or screenshots about the feature request here.
Is your feature request related to a problem? Please describe.
Currently, Dialogflow as a connector is only reading from "Airy Chat Plugin". As an Airy user, i need to enable Dialogflow when installed on all my "Active" connected sources connected to Airy.
Describe the solution you'd like
Add the following case switch to read different sources Metadata on
dialogflow-connector:if (text != "") {
final ObjectNode node = getNode();
switch (source) {
case "google": {
final ObjectNode representative = getNode();
representative.put("representativeType", "BOT");
node.set("representative", representative);
node.put("text", text);
return mapper.writeValueAsString(node);
}
case "viber": {
node.put("text", text);
node.put("type", "text");
return mapper.writeValueAsString(node);
}
case "chatplugin":
case "instagram":
case "facebook": {
node.put("text", text);
return mapper.writeValueAsString(node);
}
case "twilio.sms":
case "twilio.whatsapp": {
node.put("Body", text);
return mapper.writeValueAsString(node);
}
case "whatsapp": {
node.put("Body", text);
return mapper.writeValueAsString(node);
}
default: {
return null;
}
}
}