FIX: ensures we don't attempt to create a new PM on an existing topic (#9029)

This fix attempts to both fix it at UI level and server side. A previous attempt related to this behavior has been made in commit: https://github.com/discourse/discourse/commit/49c750ca7890490b1405f940b1eb2e7a4f3f69f6
This commit is contained in:
Joffrey JAFFEUX
2020-02-24 08:55:12 -06:00
committed by GitHub
parent 31f3ed8d36
commit 0ea11a9d49
6 changed files with 35 additions and 5 deletions
@@ -912,7 +912,7 @@ const Composer = RestModel.extend({
},
createPost(opts) {
if (this.action === CREATE_TOPIC) {
if (CREATE_TOPIC === this.action || PRIVATE_MESSAGE === this.action) {
this.set("topic", null);
}