Skip to content

FEATURE: per-topic unsubscribe option in emails#9

Open
akshayutture-augment wants to merge 1 commit into
email-notifications-enhancementfrom
topic-email-management
Open

FEATURE: per-topic unsubscribe option in emails#9
akshayutture-augment wants to merge 1 commit into
email-notifications-enhancementfrom
topic-email-management

Conversation

@akshayutture-augment

@akshayutture-augment akshayutture-augment commented Nov 17, 2025

Copy link
Copy Markdown

No description provided.

@augmentcode augmentcode Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 2 suggestions posted.

Comment augment review to trigger a new review at any time.

return redirect_to @topic_view.topic.unsubscribe_url, status: 301
end

tu = TopicUser.find_by(user_id: current_user.id, topic_id: params[:topic_id])

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tu can be nil for users without an existing TopicUser row on this topic, and tu.notification_level can also be nil; dereferencing or comparing it (nil > Integer) will raise. Consider guarding for a missing record and a nil notification_level before toggling.

🤖 Was this useful? React with 👍 or 👎

@@ -1,31 +1,29 @@
<div id='main' class=<%= classes %>>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The class attribute is missing quotes around <%= classes %>, which can produce invalid HTML when multiple classes are present and break styling in many email clients. Consider wrapping the value in quotes.

🤖 Was this useful? React with 👍 or 👎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants