 Niyas
					
					4 years ago
						Niyas
					
					4 years ago
					
						
							committed by
							
								 GitHub
								GitHub
							
						 
					
				 
				
			 
		 
		
			
				
					
					No known key found for this signature in database
					
						
							GPG Key ID: 4AEE18F83AFDEB23
						
					
				
			
		
		
		
	
		
			
				 1 changed files with 
3 additions and 
3 deletions
			 
			
		 
		
			
				- 
					
					
					 
					server/notification.js
				
				
				
					
						
							
								
									
	
		
			
				
					|  |  | @ -87,7 +87,7 @@ class Notification { | 
			
		
	
		
			
				
					|  |  |  |                 // If heartbeatJSON is null, assume we're testing.
 | 
			
		
	
		
			
				
					|  |  |  |                 if (heartbeatJSON == null) { | 
			
		
	
		
			
				
					|  |  |  |                     let discordtestdata = { | 
			
		
	
		
			
				
					|  |  |  |                         username: "Uptime Kuma", | 
			
		
	
		
			
				
					|  |  |  |                         username: notification.discordUsername || "Uptime Kuma", | 
			
		
	
		
			
				
					|  |  |  |                         content: msg, | 
			
		
	
		
			
				
					|  |  |  |                     } | 
			
		
	
		
			
				
					|  |  |  |                     await axios.post(notification.discordWebhookUrl, discordtestdata) | 
			
		
	
	
		
			
				
					|  |  | @ -96,7 +96,7 @@ class Notification { | 
			
		
	
		
			
				
					|  |  |  |                 // If heartbeatJSON is not null, we go into the normal alerting loop.
 | 
			
		
	
		
			
				
					|  |  |  |                 if (heartbeatJSON["status"] == 0) { | 
			
		
	
		
			
				
					|  |  |  |                     let discorddowndata = { | 
			
		
	
		
			
				
					|  |  |  |                     username: "Uptime Kuma", | 
			
		
	
		
			
				
					|  |  |  |                     username: notification.discordUsername || "Uptime Kuma", | 
			
		
	
		
			
				
					|  |  |  |                     embeds: [{ | 
			
		
	
		
			
				
					|  |  |  |                         title: "❌ One of your services went down. ❌", | 
			
		
	
		
			
				
					|  |  |  |                         color: 16711680, | 
			
		
	
	
		
			
				
					|  |  | @ -126,7 +126,7 @@ class Notification { | 
			
		
	
		
			
				
					|  |  |  |                      | 
			
		
	
		
			
				
					|  |  |  |                 } else if (heartbeatJSON["status"] == 1) { | 
			
		
	
		
			
				
					|  |  |  |                     let discordupdata = { | 
			
		
	
		
			
				
					|  |  |  |                     username: "Uptime Kuma", | 
			
		
	
		
			
				
					|  |  |  |                     username: notification.discordUsername || "Uptime Kuma", | 
			
		
	
		
			
				
					|  |  |  |                     embeds: [{ | 
			
		
	
		
			
				
					|  |  |  |                         title: "✅ Your service " +  monitorJSON["name"] + " is up! ✅", | 
			
		
	
		
			
				
					|  |  |  |                         color: 65280, | 
			
		
	
	
		
			
				
					|  |  | 
 |