Skip to content

Commit

Permalink
HTML formatting for messages
Browse files Browse the repository at this point in the history
  • Loading branch information
pengrad committed Jan 23, 2016
1 parent 38cdf3d commit a0f8005
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
* 10/21/15.
*/
public enum ParseMode {
Markdown
Markdown, HTML
}
4 changes: 4 additions & 0 deletions src/test/java/com/pengrad/telegrambot/TelegramBotTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ public void testSendMessage() throws Exception {
MessageTest.checkTextMessage(sendResponse.message());
sendResponse = bot.sendMessage(channelId, "explicit to channel id _italic_ *markdown*", ParseMode.Markdown, false, null, new ReplyKeyboardHide());
MessageTest.checkTextMessage(sendResponse.message());
sendResponse = bot.sendMessage(channelName, "to channel name with html <b>bold</b>, <strong>bold</strong> " +
"<i>italic</i>, <em>italic</em> <a href=\"https://telegram.org\">inline URL</a> <code>inline fixed-width code</code> <pre>pre-formatted fixed-width code block</pre>",
ParseMode.HTML, false, null, new ReplyKeyboardHide());
MessageTest.checkTextMessage(sendResponse.message());
}

@Test
Expand Down

0 comments on commit a0f8005

Please sign in to comment.