openNewMessage missing tags parameter

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

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?

  @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,
    });
  }
1 Like