diff --git a/src/client.rs b/src/client.rs index bf318c7..7952433 100644 --- a/src/client.rs +++ b/src/client.rs @@ -170,7 +170,7 @@ fn request(method: &'static Method, path: String, redirect: bool, quarantine: bo // Construct the hyper client from the HTTPS connector. let client: Client<_, Body> = CLIENT.clone(); - let (token, vendor_id, device_id, user_agent, loid) = { + let (token, vendor_id, device_id, mut user_agent, loid) = { let client = block_on(OAUTH_CLIENT.read()); ( client.token.clone(), @@ -180,6 +180,12 @@ fn request(method: &'static Method, path: String, redirect: bool, quarantine: bo client.headers_map.get("x-reddit-loid").cloned().unwrap_or_default(), ) }; + + // Check if multi sub requested. If so, replace "Android" with a tricky word. + if path.contains("+") { + user_agent = user_agent.replace("Android", "Andr​oid"); + } + // Build request to Reddit. When making a GET, request gzip compression. // (Reddit doesn't do brotli yet.) let builder = Request::builder()