Check if group exist before fetching the mention (#6816)
This commit is contained in:
parent
529d149a17
commit
33b2cb6623
2 changed files with 2 additions and 2 deletions
|
|
@ -451,7 +451,7 @@ export const fetchUsersByUsernames = async (serverUrl: string, usernames: string
|
|||
|
||||
const users = await client.getProfilesByUsernames([...new Set(usersToLoad)]);
|
||||
|
||||
if (!fetchOnly) {
|
||||
if (users.length && !fetchOnly) {
|
||||
await operator.handleUsers({
|
||||
users,
|
||||
prepareRecordsOnly: false,
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ const AtMention = ({
|
|||
// Effects
|
||||
useEffect(() => {
|
||||
// Fetches and updates the local db store with the mention
|
||||
if (!user.username) {
|
||||
if (!user.username && !group?.name) {
|
||||
fetchUserOrGroupsByMentionsInBatch(serverUrl, mentionName);
|
||||
}
|
||||
}, []);
|
||||
|
|
|
|||
Loading…
Reference in a new issue