Skip to content

Commit

Permalink
Merge pull request #380 from TheSilkky/master
Browse files Browse the repository at this point in the history
Allow PubSub Hub url to be configured
  • Loading branch information
FireMasterK authored Oct 4, 2022
2 parents 202df96 + 4e155fc commit 2433586
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/main/java/me/kavin/piped/consts/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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"));
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/me/kavin/piped/utils/ResponseHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -1705,7 +1705,7 @@ public static void subscribePubSub(String channelId) throws IOException {
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();

Expand Down

0 comments on commit 2433586

Please sign in to comment.