u/Littux

Banned users list breaks on shreddit/apps due to one user. Works fine on Old Reddit

This OF spam bot banned by u/bot-bouncer is causing the issue:

{
  "operationName": "GetBannedUsers",
  "extensions": {
    "persistedQuery": {
      "sha256Hash": "9a05dd26e805552c9ddefa01262415fb806f70bfff62ea5cedae09df35c3dbe7",
      "version": 1
    }
  },
  "variables": {
    "subreddit": "southindia_",
    "userName": "OkEducator8465"
  }
}

{
  "data": {
    "subredditInfoByName": {
      "__typename": "Subreddit",
      "id": "t5_dotjez",
      "bannedMembers": {
        "edges": [{
          "node": null
        }],
        "pageInfo": {
          "hasNextPage": false,
          "endCursor": "MTk4ODk0ODgzOTE="
        }
      }
    }
  },
  "extensions": {
    "valueCompletion": [{
      "message": "Null value found for non-nullable type String",
      "path": ["subredditInfoByName", "bannedMembers", "edges", 0, "node", "redditor"]
    }, {
      "message": "Null value found for non-nullable type RedditorInfo",
      "path": ["subredditInfoByName", "bannedMembers", "edges", 0, "node", "redditor"]
    }]
  }
}

The user isn't banned/suspended. Where the error occurs:

redditor {
	__typename
	... on Redditor {
		id
		displayName
		icon {
			url
		}
	}
	... on UnavailableRedditor {
		id
		name
	}
	... on DeletedRedditor {
		id
		displayName
	}
}
reddit.com
u/Littux — 10 days ago
▲ 53 r/downvoteautomod+3 crossposts

Upcoming changes to the comment ID endpoint

Hola devs! 

Just a quick note on an upcoming change to how comment IDs will increase going forward. 

TL;DR:  if you have anything in your code that expects comment IDs to be fewer than 8 characters you will need to make an adjustment. 

Technical gibberish details:

  • New comment IDs will continue to be 64-bit integers and base36-encoded, but will not be monotonically increasing anymore
  • The key visible difference is that the new base36-encoded comment IDs will be up to 13 characters long (e.g. 19gsnavtu46ip), compared to the current 7-8 characters
  • With the t1_ prefix, the new base36-encoded comment IDs will be up to 16 characters long (e.g. t1_19gsnavtu46ip)
  • Older comment IDs are not changing, and referencing them will not break anything

This change will start rolling out the week of May 18th. Let me know if you have any questions about this change.

reddit.com
u/Littux — 6 days ago
▲ 0 r/bugs

POST https://www.reddit.com/svc/shreddit/graphql
{
  "operation": "UpdateSubredditSettings",
  "variables": {
    "input": {
      "subredditId": "t5_60hed7",
      "commentContributionSettings": {
        "allowedMediaTypes": ["ANIMATED", "GIPHY", "EXPRESSION", "VIDEO"]
      }
    }
  },
  "csrf_token": "<token>"
}

{
  "data": {
    "updateSubredditSettings": null
  },
  "errors": [{
    "message": "INVALID_REQUEST : At least one of the allowed_media_types is not a valid int enum",
    "path": ["updateSubredditSettings"]
  }],
  "operation": "UpdateSubredditSettings",
  "extensions": {
    "traceID": "e3ca883a33ee5e1a23e4bfe7a3da4f67"
  }
}

What works:

await fetch("https://www.reddit.com/svc/shreddit/graphql", {
  "credentials": "include",
  "headers": {
    "Content-Type": "application/json",
  },
  "body": JSON.stringify({
    "operation": "UpdateSubredditSettings",
    "variables": {
      "input": {
        "subredditId": "t5_60hed7",
        "commentContributionSettings": {
          "allowedMediaTypes": ["ANIMATED", "GIPHY", "EXPRESSION"]
        }
      }
    },
    "csrf_token": (await cookieStore.get("csrf_token")).value
  }),
  "method": "POST",
  "mode": "cors"
});

{
  "data": {
    "updateSubredditSettings": {
      "ok": true,
      "errors": null
    }
  },
  "errors": [],
  "operation": "UpdateSubredditSettings"
}
u/Littux — 23 days ago