-
Notifications
You must be signed in to change notification settings - Fork 78
CommentMediaTypes and asCommentMediaTypes doesn't include "video" #253
Copy link
Copy link
Open
Description
This feature has been available on some subreddits for a while, but it appears to be aiming for a broader beta soon.
Devvit apps on subreddits with this enabled will fail to fetch the current subreddit with the error: Error: invalid comment media type: video
This was recently noted on /r/Devvit and a few months ago on the Devvit Discord.
Looks like it's just a @devvit/public-api and @devvit/reddit issue, @devvit/protos defines Subreddit.allowedMediaInComments as string[]
| export type CommentMediaTypes = 'giphy' | 'static' | 'animated' | 'expression'; |
devvit/packages/public-api/src/apis/reddit/models/Subreddit.ts
Lines 1732 to 1738 in 3ba115c
| function asCommentMediaTypes(type: string): CommentMediaTypes { | |
| if (type === 'animated' || type === 'giphy' || type === 'static' || type === 'expression') { | |
| return type; | |
| } | |
| throw new Error(`invalid comment media type: ${type}`); | |
| } |
| export type CommentMediaTypes = 'giphy' | 'static' | 'animated' | 'expression'; |
devvit/packages/reddit/src/models/Subreddit.ts
Lines 1552 to 1558 in 3ba115c
| function asCommentMediaTypes(type: string): CommentMediaTypes { | |
| if (type === 'animated' || type === 'giphy' || type === 'static' || type === 'expression') { | |
| return type; | |
| } | |
| throw new Error(`invalid comment media type: ${type}`); | |
| } |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels