#621 Added streamId and formMessageId to FormReplyActivity#622
#621 Added streamId and formMessageId to FormReplyActivity#622thibauult merged 3 commits intofinos:mainfrom
Conversation
|
@symphony-thibault Sorry there seems to be some confusion here: |
|
Hi @ystan-, To me what has been done in this PR is correct and resolve the problem:
The top-level The following example shows that what is needed to update the original form is the @Slf4j
public class Example {
private static final String FORM = "<messageML>\n"
+ " <form id=\"the-form\">\n"
+ " <text-field name=\"name\" placeholder=\"Input your name...\" required=\"true\"/>\n"
+ " <button name=\"send-answers\" type=\"action\">Send Answers</button>\n"
+ " </form>\n"
+ "</messageML>";
public static void main(String[] args) throws Exception {
final SymphonyBdk bdk = new SymphonyBdk(loadFromSymphonyDir("config.yaml"));
bdk.activities().register(slash("/form", false, c -> {
V4Message msg = bdk.messages().send(c.getStreamId(), FORM);
log.info("Message sent: {}", msg.getMessageId());
}));
bdk.datafeed().subscribe(new RealTimeEventListener() {
@Override
public void onSymphonyElementsAction(V4Initiator initiator, V4SymphonyElementsAction event) throws EventException {
log.info("Form reply received: {}", event.getFormMessageId());
}
});
bdk.datafeed().start();
}
}with output: We indeed decided to call this field Please let me know if it helps 👍 |
|
Apologies - you're right. This works. |
Closes #621
2 new fields added to the
FormReplyActivityclass:streamIdformMessageId