mirror of
				https://github.com/TeamPiped/Piped-Backend.git
				synced 2024-08-14 23:51:41 +00:00 
			
		
		
		
	Allow having a different url for pubsub. (#290)
This would be useful for onion instances.
This commit is contained in:
		
							parent
							
								
									160e6933d3
								
							
						
					
					
						commit
						e085d4c8a3
					
				
					 2 changed files with 4 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -34,6 +34,8 @@ public class Constants {
 | 
			
		|||
 | 
			
		||||
    public static final String PUBLIC_URL;
 | 
			
		||||
 | 
			
		||||
    public static final String PUBSUB_URL;
 | 
			
		||||
 | 
			
		||||
    public static final String HTTP_PROXY;
 | 
			
		||||
 | 
			
		||||
    public static final String FRONTEND_URL;
 | 
			
		||||
| 
						 | 
				
			
			@ -69,6 +71,7 @@ public class Constants {
 | 
			
		|||
            CAPTCHA_BASE_URL = getProperty(prop, "CAPTCHA_BASE_URL");
 | 
			
		||||
            CAPTCHA_API_KEY = getProperty(prop, "CAPTCHA_API_KEY");
 | 
			
		||||
            PUBLIC_URL = getProperty(prop, "API_URL");
 | 
			
		||||
            PUBSUB_URL = getProperty(prop, "PUBSUB_URL", PUBLIC_URL);
 | 
			
		||||
            HTTP_PROXY = getProperty(prop, "HTTP_PROXY");
 | 
			
		||||
            FRONTEND_URL = getProperty(prop, "FRONTEND_URL", "https://piped.kavin.rocks");
 | 
			
		||||
            COMPROMISED_PASSWORD_CHECK = Boolean.parseBoolean(getProperty(prop, "COMPROMISED_PASSWORD_CHECK", "true"));
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1418,7 +1418,7 @@ public class ResponseHelper {
 | 
			
		|||
 | 
			
		||||
        if (pubsub == null || System.currentTimeMillis() - pubsub.getSubbedAt() > TimeUnit.DAYS.toMillis(4)) {
 | 
			
		||||
 | 
			
		||||
            String callback = Constants.PUBLIC_URL + "/webhooks/pubsub";
 | 
			
		||||
            String callback = Constants.PUBSUB_URL + "/webhooks/pubsub";
 | 
			
		||||
            String topic = "https://www.youtube.com/xml/feeds/videos.xml?channel_id=" + channelId;
 | 
			
		||||
 | 
			
		||||
            var builder = new Request.Builder()
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue