FEATURE: per-topic unsubscribe option in emails#9
Conversation
|
@claude review this PR |
1 similar comment
|
@claude review this PR |
|
Claude finished @akshayutture-augment's task —— View job Code Review: Per-Topic Unsubscribe Option in EmailsI've completed a thorough review of this PR. Here are my findings: OverviewThis PR adds a per-topic unsubscribe feature that allows users to change their notification settings for specific topics directly from email notifications. The implementation spans backend (Rails), frontend (Ember.js), and email templates. 🔴 Critical Issues1. Missing Authentication/Authorization in Unsubscribe Route (Security)Location: The
Recommendation: Implement a secure token-based unsubscribe mechanism similar to the digest unsubscribe feature (see 2. Potential Nil Pointer ExceptionLocation: tu = TopicUser.find_by(user_id: current_user.id, topic_id: params[:topic_id])
if tu.notification_level > TopicUser.notification_levels[:regular]
tu.notification_level = TopicUser.notification_levels[:regular]
else
tu.notification_level = TopicUser.notification_levels[:muted]
end
tu.save!If no Recommendation: Add nil check or use tu = TopicUser.find_or_initialize_by(user_id: current_user.id, topic_id: params[:topic_id])
|
|
This pull request has been automatically marked as stale because it has been open for 60 days with no activity. To keep it open, remove the stale tag, push code, or add a comment. Otherwise, it will be closed in 14 days. |
Test 2
Replicated from ai-code-review-evaluation/discourse-greptile#2