From a10d2f6edf826e11614bb6098c2d088c9cdec8a6 Mon Sep 17 00:00:00 2001 From: Ellie Date: Tue, 4 Oct 2022 07:44:53 +0000 Subject: [PATCH 1/2] Add PUBSUB_HUB_URL constant --- src/main/java/me/kavin/piped/consts/Constants.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/me/kavin/piped/consts/Constants.java b/src/main/java/me/kavin/piped/consts/Constants.java index bdf93dd..9ae50d6 100644 --- a/src/main/java/me/kavin/piped/consts/Constants.java +++ b/src/main/java/me/kavin/piped/consts/Constants.java @@ -36,6 +36,8 @@ public class Constants { public static final String PUBLIC_URL; public static final String PUBSUB_URL; + + public static final String PUBSUB_HUB_URL; public static final String HTTP_PROXY; @@ -85,6 +87,7 @@ public class Constants { CAPTCHA_API_KEY = getProperty(prop, "CAPTCHA_API_KEY"); PUBLIC_URL = getProperty(prop, "API_URL"); PUBSUB_URL = getProperty(prop, "PUBSUB_URL", PUBLIC_URL); + PUBSUB_HUB_URL = getProperty(prop, "PUBSUB_HUB_URL", "https://pubsubhubbub.appspot.com/subscribe"); 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")); From 4e155fc70aeb2ef3e4377a4cde757e681d0d8983 Mon Sep 17 00:00:00 2001 From: Ellie Date: Tue, 4 Oct 2022 07:46:19 +0000 Subject: [PATCH 2/2] Get PubSub Hub url from constants --- src/main/java/me/kavin/piped/utils/ResponseHelper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/me/kavin/piped/utils/ResponseHelper.java b/src/main/java/me/kavin/piped/utils/ResponseHelper.java index 80cfea6..2cb6e1c 100644 --- a/src/main/java/me/kavin/piped/utils/ResponseHelper.java +++ b/src/main/java/me/kavin/piped/utils/ResponseHelper.java @@ -1705,7 +1705,7 @@ public class ResponseHelper { String topic = "https://www.youtube.com/xml/feeds/videos.xml?channel_id=" + channelId; var builder = new Request.Builder() - .url("https://pubsubhubbub.appspot.com/subscribe"); + .url(Constants.PUBSUB_HUB_URL); var formBuilder = new FormBody.Builder();