The official documentation shows that strings with an alias of PostType are supposed to be in lowercase, but testing reveals that in SubredditInfo.allAllowedPostTypes, they are stored in uppercase (e.g., "TEXT" instead of "text").
See the below screenshot; I simply logged all the PostType strings in SubredditInfo.allAllowedPostTypes to the console.
In my code, I've worked around this by casting the PostType to a string and calling toLowerCase() on it. Nevertheless, I felt I should report this bug.
The official documentation shows that strings with an alias of
PostTypeare supposed to be in lowercase, but testing reveals that inSubredditInfo.allAllowedPostTypes, they are stored in uppercase (e.g.,"TEXT"instead of"text").See the below screenshot; I simply logged all the
PostTypestrings inSubredditInfo.allAllowedPostTypesto the console.In my code, I've worked around this by casting the
PostTypeto astringand callingtoLowerCase()on it. Nevertheless, I felt I should report this bug.