fix: Mentions do not show any options in public collections (#5150)
* Mentions do not show any options in public collections * Avoid reset data while loading
This commit is contained in:
@@ -452,20 +452,28 @@ router.post(
|
||||
|
||||
let users: User[] = [];
|
||||
let total = 0;
|
||||
let where: WhereOptions<User> = {
|
||||
teamId: document.teamId,
|
||||
suspendedAt: {
|
||||
[Op.is]: null,
|
||||
},
|
||||
};
|
||||
|
||||
if (document.collectionId) {
|
||||
const memberIds = await Collection.membershipUserIds(
|
||||
document.collectionId
|
||||
);
|
||||
const collection = await document.$get("collection");
|
||||
|
||||
if (!collection?.permission) {
|
||||
const memberIds = await Collection.membershipUserIds(
|
||||
document.collectionId
|
||||
);
|
||||
where = {
|
||||
...where,
|
||||
id: {
|
||||
[Op.in]: memberIds,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
let where: WhereOptions<User> = {
|
||||
id: {
|
||||
[Op.in]: memberIds,
|
||||
},
|
||||
suspendedAt: {
|
||||
[Op.is]: null,
|
||||
},
|
||||
};
|
||||
if (query) {
|
||||
where = {
|
||||
...where,
|
||||
|
||||
Reference in New Issue
Block a user