Mention in Post

You can mention users in text, image, video and file posts. You can search the display name of the user that you want to mention.

Amity.Post contains new properties related to mention feature:

  1. metadata

    Dictionary which can contain any information about the post content. Our default structure to represent mentions is inside the metadata property. You can use any structure to represent mentions.

  2. mentionees

    Array of Amity.Mentionees objects. You can only mention users in a post.

How mention works

You are free to define your own structure to represent mentions. To do this, use the metadata property of Amity.Post and store mentions in metadata property.

Create a Mention in Post

The following code demonstrates how to create a post with mention

The example of how to create a post with mention. In this example, we show a text post with mention. However the pattern of adding mention to a post; is the same for all post types. You can change the post builder to the desired post type.

Update Post with Mentions

The following code demonstrates how to update a post with mention.

Last updated