Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow adding tags as a custom subject format for emails #5846

Merged
merged 6 commits into from
Jul 11, 2018

Conversation

majakomel
Copy link
Contributor

@discoursebot
Copy link

You've signed the CLA, majakomel. Thank you! This pull request is ready for review.

@@ -433,6 +443,14 @@ def send_notification_email(opts)
show_category_in_subject = nil
end

# tag names
tags = Topic.find_by(id: post.topic_id)&.tags
if opts[:show_tags_in_subject] && post.topic_id && tags
Copy link
Member

Choose a reason for hiding this comment

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

I would first check tags are allowed in subject and only then do the SQL query.

Copy link
Member

Choose a reason for hiding this comment

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

Also, there should probably be a limit of the number of tags retrieved.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What would be the best limit? 3 tags? Should there be any specific order as well then?

Copy link
Member

Choose a reason for hiding this comment

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

3 seems fine. I would keep the same order as in the post.

@SamSaffron
Copy link
Member

This looks good to me, should we be adding spaces between tags or having them this close together?

Note we need to wait 2 weeks to merge this in cause we are stabalizing the 2.0 release at the moment.

@SamSaffron SamSaffron added the 2.1 label May 28, 2018
@discoursebot
Copy link

This pull request has been mentioned on Discourse Meta. There might be relevant details there:

https://meta.discourse.org/t/allow-adding-tags-as-a-custom-subject-format-for-emails/84424/4

@SamSaffron
Copy link
Member

cool, merging now

@SamSaffron SamSaffron merged commit 0942e2c into discourse:master Jul 11, 2018
@majakomel majakomel deleted the tags_email_subject branch December 16, 2018 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants