mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-03-06 17:11:55 +00:00
Only members that have access to a channel should appear on the member sidebar
This commit is contained in:
@@ -90,6 +90,7 @@ function useEntries(
|
|||||||
const sort = member?.nickname ?? u.username;
|
const sort = member?.nickname ?? u.username;
|
||||||
const entry = [u, sort] as [User, string];
|
const entry = [u, sort] as [User, string];
|
||||||
|
|
||||||
|
if (member?.hasPermission(channel, "ViewChannel")) {
|
||||||
if (!u.online || u.status?.presence === "Invisible") {
|
if (!u.online || u.status?.presence === "Invisible") {
|
||||||
categories.offline.push(entry);
|
categories.offline.push(entry);
|
||||||
} else {
|
} else {
|
||||||
@@ -114,6 +115,7 @@ function useEntries(
|
|||||||
|
|
||||||
categories.online.push(entry);
|
categories.online.push(entry);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Object.keys(categories).forEach((key) =>
|
Object.keys(categories).forEach((key) =>
|
||||||
|
|||||||
Reference in New Issue
Block a user