FIX: Set the "hasTargetGroups" attribute in the composer when clicking the message group button. (PR #12536)

After clicking the message button on the group page, the composer shouldn’t display the “official warning” checkbox. The discourse-bcc plugin also relies on this attribute to display an option in the composer.

GitHub

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

Can we convert these arguments to an object so it’s more readable? See one of the call sites:

this.send(
      "createNewMessageViaParams",
      this.get("model.name"),
      "",
      "",
      true
    );

I have no idea what those parameters are! It would be so much nicer like:

  this.send(
    "createNewMessageViaParams",
    { recipients: this.get("model.name"),
       hasGroups: true
    });

(assuming we omit "" params).