Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how do i multiple ReplyMessage in java? #117

Closed
TitusEfferian opened this issue Jun 8, 2017 · 5 comments
Closed

how do i multiple ReplyMessage in java? #117

TitusEfferian opened this issue Jun 8, 2017 · 5 comments

Comments

@TitusEfferian
Copy link

how do i multiple ReplyMessage in java?

@kazuki-ma
Copy link
Contributor

To return multiple message, please return List<Message> on @EventMapping annotated method.

@krrrr38
Copy link
Contributor

krrrr38 commented Jun 8, 2017

ReplyMessage contains 2 kinds of constructor. one is new ReplyMessage(String replyToken, Message message), second one is new ReplyMessage(String replyToken, List<Message> messages).
you can send multiple messages in a reply using second one.

@TitusEfferian
Copy link
Author

TitusEfferian commented Jun 8, 2017

1496938271142

where did i go wrong?
sorry for disturbing your time
thank you very much

@krrrr38
Copy link
Contributor

krrrr38 commented Jun 9, 2017

try this.

List<Message> messages = Arrays.asList(new TextMessage("hai"), new TextMessage("how are you"));
LineMessagingServiceBuilder.create(lChannelAccessToken)
                           .build()
                           .replyMessage(new ReplyMessage(replyToken, messages))
                           .execute();

@TitusEfferian
Copy link
Author

messageimage_1496985299846
solved... thanks a lot

@krrrr38 krrrr38 closed this as completed Jun 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants