From c3d4c949f1a5e295858d60b4c5434f2eacaaea1c Mon Sep 17 00:00:00 2001 From: cpradio Date: Wed, 16 Nov 2016 06:26:36 -0500 Subject: [PATCH] Add comments to relevant sections denoting "create new topic" scenario is not supported for cannot-see-mention (per @coding-horror instruction) --- .../javascripts/discourse/components/composer-editor.js.es6 | 2 ++ app/assets/javascripts/discourse/lib/link-mentions.js.es6 | 2 ++ app/controllers/users_controller.rb | 2 ++ 3 files changed, 6 insertions(+) diff --git a/app/assets/javascripts/discourse/components/composer-editor.js.es6 b/app/assets/javascripts/discourse/components/composer-editor.js.es6 index 06e04cf75c1..55b69c64a1c 100644 --- a/app/assets/javascripts/discourse/components/composer-editor.js.es6 +++ b/app/assets/javascripts/discourse/components/composer-editor.js.es6 @@ -137,6 +137,8 @@ export default Ember.Component.extend({ }, _renderUnseenMentions($preview, unseen) { + // 'Create a New Topic' scenario is not supported (per conversation with codinghorror) + // https://meta.discourse.org/t/taking-another-1-7-release-task/51986/7 fetchUnseenMentions(unseen, this.get('topic.id')).then(() => { linkSeenMentions($preview, this.siteSettings); this._warnMentionedGroups($preview); diff --git a/app/assets/javascripts/discourse/lib/link-mentions.js.es6 b/app/assets/javascripts/discourse/lib/link-mentions.js.es6 index bed1ba9b515..20876bd72e6 100644 --- a/app/assets/javascripts/discourse/lib/link-mentions.js.es6 +++ b/app/assets/javascripts/discourse/lib/link-mentions.js.es6 @@ -51,6 +51,8 @@ export function linkSeenMentions($elem, siteSettings) { return []; } +// 'Create a New Topic' scenario is not supported (per conversation with codinghorror) +// https://meta.discourse.org/t/taking-another-1-7-release-task/51986/7 export function fetchUnseenMentions(usernames, topic_id) { return ajax("/users/is_local_username", { data: { usernames, topic_id } }).then(r => { r.valid.forEach(v => found[v] = true); diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index ea8e2c12a86..792369932ea 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -242,6 +242,8 @@ class UsersController < ApplicationController usernames -= groups usernames.each(&:downcase!) + # Create a New Topic Scenario is not supported (per conversation with codinghorror) + # https://meta.discourse.org/t/taking-another-1-7-release-task/51986/7 cannot_see = [] topic_id = params[:topic_id] unless topic_id.blank?