2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-05 08:59:27 +08:00

FIX: posting my fail because there are no tags

This commit is contained in:
Neil Lalonde 2016-05-06 11:20:05 -04:00
parent 2d2bf4dd56
commit 1625b08c86
2 changed files with 8 additions and 6 deletions

View file

@ -438,11 +438,13 @@ class PostCreator
end
def auto_notify_for_tags
tags = DiscourseTagging.tags_for_saving(@opts[:tags], @guardian)
if tags.present?
@topic.custom_fields.update(DiscourseTagging::TAGS_FIELD_NAME => tags)
@topic.save
DiscourseTagging.auto_notify_for(tags, @topic)
if SiteSetting.tagging_enabled
tags = DiscourseTagging.tags_for_saving(@opts[:tags], @guardian)
if tags.present?
@topic.custom_fields.update(DiscourseTagging::TAGS_FIELD_NAME => tags)
@topic.save
DiscourseTagging.auto_notify_for(tags, @topic)
end
end
end