Skip to content

Commit

Permalink
fix: User agent can be used to determine the source
Browse files Browse the repository at this point in the history
  • Loading branch information
LisoUseInAIKyrios committed Apr 10, 2024
1 parent fac25c5 commit 5913388
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,8 @@ class SocialLinksRoutes {
new ReVancedSocialLink(true, "ReVanced.app", "https://revanced.app")
};

private static final String SOCIAL_LINKS_PROVIDER = "https://api.revanced.app/v2/socials";
private static final Route.CompiledRoute GET_SOCIAL = new Route(GET, "?source=appSettings").compile();
private static final String SOCIAL_LINKS_PROVIDER = "https://api.revanced.app/v2";
private static final Route.CompiledRoute GET_SOCIAL = new Route(GET, "/socials").compile();

@Nullable
private static volatile ReVancedSocialLink[] fetchedLinks;
Expand All @@ -272,7 +272,7 @@ static ReVancedSocialLink[] fetchSocialLinks() {
try {
if (hasFetchedLinks()) return fetchedLinks;

// Check if there is internet connection
// Check if there is no internet connection.
if (!Utils.isNetworkConnected()) return NO_CONNECTION_STATIC_LINKS;

HttpURLConnection connection = Requester.getConnectionFromCompiledRoute(SOCIAL_LINKS_PROVIDER, GET_SOCIAL);
Expand Down

0 comments on commit 5913388

Please sign in to comment.