Skip to content

Commit

Permalink
fixed issue #6
Browse files Browse the repository at this point in the history
  • Loading branch information
mastercake10 committed Feb 8, 2018
1 parent 2cbd924 commit de5d0b0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/de/Linus122/TelegramChat/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ public void onChat(AsyncPlayerChatEvent e){
if(telegramHook.connected){
Chat chat = new Chat();
chat.parse_mode = "Markdown";
chat.text = escape(e.getPlayer().getName()) + ": _" + e.getMessage().replaceAll("§.", "") + "_";
chat.text = escape(e.getPlayer().getName()) + ": " + escape(e.getMessage()).replaceAll("§.", "") ;
telegramHook.sendAll(chat);
}
}
Expand Down
1 change: 1 addition & 0 deletions src/main/java/de/Linus122/TelegramChat/Telegram.java
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ public void sendMsg(Chat chat){
actionListener.onSendToTelegram(chat);
}
Gson gson = new Gson();

post("sendMessage", gson.toJson(chat, Chat.class));

}
Expand Down

0 comments on commit de5d0b0

Please sign in to comment.