mirror of
https://github.com/flarum/core.git
synced 2025-08-01 22:20:21 +02:00
Import function correctly
There was a typo in the function's name which broke mentions.
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
import getCleanDisplayName, { ShouldUseOldFormat } from './getCleanDisplayName';
|
import getCleanDisplayName, { shouldUseOldFormat } from './getCleanDisplayName';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fetches the mention text for a specified user (and optionally a post ID for replies).
|
* Fetches the mention text for a specified user (and optionally a post ID for replies).
|
||||||
@@ -20,7 +20,7 @@ import getCleanDisplayName, { ShouldUseOldFormat } from './getCleanDisplayName';
|
|||||||
*/
|
*/
|
||||||
export default function getMentionText(user, postId) {
|
export default function getMentionText(user, postId) {
|
||||||
if (postId === undefined) {
|
if (postId === undefined) {
|
||||||
if (ShouldUseOldFormat()) {
|
if (shouldUseOldFormat()) {
|
||||||
// Plain @username
|
// Plain @username
|
||||||
const cleanText = getCleanDisplayName(user, false);
|
const cleanText = getCleanDisplayName(user, false);
|
||||||
return `@${cleanText}`;
|
return `@${cleanText}`;
|
||||||
|
Reference in New Issue
Block a user