Skip to content

Commit

Permalink
Merge pull request #2635 from brave/reddit_fixup
Browse files Browse the repository at this point in the history
Reddit publishers now appear correctly in publisher panel when account is set to hide from robots
  • Loading branch information
Jason Sadler authored Jun 7, 2019
2 parents 40a1110 + fac91f8 commit 15a7b77
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,10 @@ std::string MediaReddit::GetUserId(const std::string& response) {
if (response.empty()) {
return std::string();
}

std::string id(braveledger_media::ExtractData(
response, "hideFromRobots\":false,\"id\":\"t2_", "\""));
const std::string pattern = braveledger_media::ExtractData(
response, "hideFromRobots\":", "\"isEmployee\"");
std::string id = braveledger_media::ExtractData(
pattern, "\"id\":\"t2_", "\"");

if (id.empty()) {
id = braveledger_media::ExtractData(
Expand Down

0 comments on commit 15a7b77

Please sign in to comment.