| 
														
															@@ -156,13 +156,17 @@ public class Telegram { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 					TelegramChat.getInstance().getLogger().info("Omitted message Telegram->MC because it was sent while the server was offline."); 
														 | 
														
														 | 
														
															 					TelegramChat.getInstance().getLogger().info("Omitted message Telegram->MC because it was sent while the server was offline."); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 				} 
														 | 
														
														 | 
														
															 				} 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 			} 
														 | 
														
														 | 
														
															 			} 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		} else { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+			boolean skipIfNeedToLinkSilent = TelegramChat.getInstance().getConfig().getBoolean("omit-messages-need-to-link"); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+			if (!skipIfNeedToLinkSilent) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+				this.sendMsg(chat.getId(), Utils.formatMSG("need-to-link")[0]); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+			} 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		} 
														 | 
														
														 | 
														
															 		} 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	} 
														 | 
														
														 | 
														
															 	} 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	public void sendMsg(long id, String msg) { 
														 | 
														
														 | 
														
															 	public void sendMsg(long id, String msg) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		ChatMessageToTelegram chat = new ChatMessageToTelegram(); 
														 | 
														
														 | 
														
															 		ChatMessageToTelegram chat = new ChatMessageToTelegram(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		chat.chat_id = id; 
														 | 
														
														 | 
														
															 		chat.chat_id = id; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-		chat.disable_notification = true; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		chat.text = msg; 
														 | 
														
														 | 
														
															 		chat.text = msg; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		sendMsg(chat); 
														 | 
														
														 | 
														
															 		sendMsg(chat); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	} 
														 | 
														
														 | 
														
															 	} 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -171,6 +175,13 @@ public class Telegram { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		for (TelegramActionListener actionListener : listeners) { 
														 | 
														
														 | 
														
															 		for (TelegramActionListener actionListener : listeners) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 			actionListener.onSendToTelegram(chat); 
														 | 
														
														 | 
														
															 			actionListener.onSendToTelegram(chat); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		} 
														 | 
														
														 | 
														
															 		} 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		boolean turnNotificationToSilent = TelegramChat.getInstance().getConfig().getBoolean("turn-to-silent-notification"); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		if(turnNotificationToSilent) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+			chat.disable_notification = true; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		} else { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+			chat.disable_notification = false; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		} 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		Gson gson = new Gson(); 
														 | 
														
														 | 
														
															 		Gson gson = new Gson(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		if(!chat.isCancelled()){ 
														 | 
														
														 | 
														
															 		if(!chat.isCancelled()){ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 			post("sendMessage", gson.toJson(chat, ChatMessageToTelegram.class));	 
														 | 
														
														 | 
														
															 			post("sendMessage", gson.toJson(chat, ChatMessageToTelegram.class));	 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -182,7 +193,6 @@ public class Telegram { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 			public void run() { 
														 | 
														
														 | 
														
															 			public void run() { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 				for (long id : TelegramChat.getBackend().chat_ids) { 
														 | 
														
														 | 
														
															 				for (long id : TelegramChat.getBackend().chat_ids) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 					chat.chat_id = id; 
														 | 
														
														 | 
														
															 					chat.chat_id = id; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-					chat.disable_notification = true; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 					// post("sendMessage", gson.toJson(chat, Chat.class)); 
														 | 
														
														 | 
														
															 					// post("sendMessage", gson.toJson(chat, Chat.class)); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 					sendMsg(chat); 
														 | 
														
														 | 
														
															 					sendMsg(chat); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 				} 
														 | 
														
														 | 
														
															 				} 
														 |