Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions packages/backend/mutations/activities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -640,10 +640,7 @@ export const flagActivity = mutation({
throw new Error("You are not part of this challenge");
}

// Prevent flagging your own activity
if (activity.userId === user._id) {
throw new ConvexError("You cannot flag your own activity");
}
// Allow flagging your own activity (useful for testing/self-reporting)

// Check if user already flagged this activity
const existingFlag = await ctx.db
Expand Down