| 
					
				 | 
			
			
				@@ -156,13 +156,17 @@ public class Telegram { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					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) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		ChatMessageToTelegram chat = new ChatMessageToTelegram(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		chat.chat_id = id; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		chat.disable_notification = true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		chat.text = msg; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		sendMsg(chat); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	} 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -171,6 +175,13 @@ public class Telegram { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		for (TelegramActionListener actionListener : listeners) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			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(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		if(!chat.isCancelled()){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			post("sendMessage", gson.toJson(chat, ChatMessageToTelegram.class));	 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -182,7 +193,6 @@ public class Telegram { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			public void run() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				for (long id : TelegramChat.getBackend().chat_ids) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					chat.chat_id = id; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-					chat.disable_notification = true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					// post("sendMessage", gson.toJson(chat, Chat.class)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					sendMsg(chat); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				} 
			 |