if (update.getMessage().getText().equalsIgnoreCase("/register")) {
try {
SendMessage sendMessage = new SendMessage();
sendMessage.setChatId(update.getMessage().getChatId().toString());
sendMessage.setReplyToMessageId(update.getMessage().getMessageId());
sendMessage.setText("Press <a href=\"https://sso.***.com/account/register\">"
"HERE</a> to register");
execute(sendMessage);
} catch (TelegramApiException e) {
e.printStackTrace();
}
}
I am trying to add Html button to SendMessage.setText
, but this not work.
Did i do it wrong somewhere?
CodePudding user response:
Your question isn't clear at all. But i think you can add:
sendMessage.enableHtml(true);
You can check Tabnine