Closed orfeomorello closed 8 years ago
I found the solution! The problem is the "id" of the reply message (InlineQueryResultArticle), the following code is executed perfectly. UUID class provides a simple means for generating unique ids.
@Override
public void inLineQuery(InlineQuery arg0)
{
UUID idOne = UUID.randomUUID();
String name = arg0.getQuery();
List<InlineQueryResult> results = new LinkedList<InlineQueryResult>();
InlineQueryResultArticle article = new InlineQueryResultArticle(String.valueOf(idOne), "title", "message_text");
results.add(article);
AnswerInlineQueryRequest aiq = new AnswerInlineQueryRequest(arg0.getId(), results);
answerInlineQuery(aiq);
}
I'm sorry for answer you in late, i'm happy that you could solve the problem by yourself, maybe i have to write an article about inline mode!
This is a simple example
This code make no errors while debugging, during execution, but on telegram I have no message. The code is wrong?