# openNewMessage missing tags parameter

**URL:** https://meta.discourse.org/t/opennewmessage-missing-tags-parameter/296335
**Category:** Development
**Created:** [February 22, 2024, 3:23pm UTC](https://meta.discourse.org/t/opennewmessage-missing-tags-parameter/296335 "2024-02-22T15:23:24Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [February 22, 2024, 3:23pm UTC](https://meta.discourse.org/t/opennewmessage-missing-tags-parameter/296335/1 "2024-02-22T15:23:24Z")

</div>

I’m writing a plugin that needs to create PM that includes a tag. `composer.openNewTopic` includes a tags parameter, but `openNewMessage` does not.

[https://github.com/discourse/discourse/blob/main/app/assets/javascripts/discourse/app/services/composer.js#L1461-L1472](https://github.com/discourse/discourse/blob/main/app/assets/javascripts/discourse/app/services/composer.js#L1461-L1472)

Can I submit a simple PM including just adding the tags parameter like this? Would it need tests to show that it works, or is it OK to edit just the two lines?

```plaintext
  @action
  async openNewMessage({ title, body, recipients, hasGroups, tags }) {
    return this.open({
      action: Composer.PRIVATE_MESSAGE,
      recipients,
      topicTitle: title,
      topicBody: body,
      tags,
      archetypeId: "private_message",
      draftKey: Composer.NEW_PRIVATE_MESSAGE_KEY,
      hasGroups,
    });
  }

```
