diff --git a/src/core/nuke.ts b/src/core/nuke.ts index 2d779ea..2f3a5b6 100644 --- a/src/core/nuke.ts +++ b/src/core/nuke.ts @@ -64,6 +64,10 @@ export async function handleNukePost(props: NukePostProps) { return { success: false, message: "Can't get user" }; } + if (post.subredditId !== props.subredditId) { + return { success: false, message: 'You can only mop this subreddit.' }; + } + const modPermissions = await user.getModPermissionsForSubreddit( post.subredditName ); @@ -148,6 +152,10 @@ export async function handleNuke(props: NukeProps) { return { success: false, message: "Can't get user" }; } + if (comment.subredditId !== props.subredditId) { + return { success: false, message: 'You can only mop this subreddit.' }; + } + const modPermissions = await user.getModPermissionsForSubreddit( comment.subredditName ); diff --git a/src/routes/menu.ts b/src/routes/menu.ts index c190567..7526da4 100644 --- a/src/routes/menu.ts +++ b/src/routes/menu.ts @@ -11,6 +11,7 @@ const buildNukeFields = (targetId: string): FormField[] => [ type: 'string', helpText: 'Auto-filled from the selected item.', required: true, + disabled: true, defaultValue: targetId, }, {