Fetches the mention text for a specified user (and optionally a post ID for replies, or group).
Automatically determines which mention syntax to be used based on the option in the
admin dashboard. Also performs display name clean-up automatically.
Parameters
user: any
postId: any
group: any
Returns string
Example: New display name syntax
// '@"User"#1' getMentionText(User) // User is ID 1, display name is 'User'
Example: Replying
// '@"User"#p13' getMentionText(User, 13) // User display name is 'User', post ID is 13
Example: Using old syntax
// '@username' getMentionText(User) // User's username is 'username'
Example: Group mention
// '@"Mods"#g4' getMentionText(undefined, undefined, group) // Group display name is 'Mods', group ID is 4
Fetches the mention text for a specified user (and optionally a post ID for replies, or group).
Automatically determines which mention syntax to be used based on the option in the admin dashboard. Also performs display name clean-up automatically.