Show lock icon for closed channels

This commit is contained in:
Jon Staab
2024-12-10 13:38:34 -08:00
parent a5dfa02771
commit 80d44a097a
8 changed files with 47 additions and 17 deletions
+5 -2
View File
@@ -561,8 +561,8 @@ export const channelsById = withGetter(
}
channel.meta = {
access: meta.public ? "public" : "private",
membership: meta.open ? "open" : "closed",
access: meta.private ? "private" : "public",
membership: meta.closed ? "closed" : "open",
picture: meta.picture,
about: meta.about,
}
@@ -604,6 +604,9 @@ export const displayChannel = (url: string, room: string) => {
export const roomComparator = (url: string) => (room: string) =>
displayChannel(url, room).toLowerCase()
export const channelIsLocked = (channel?: Channel) =>
channel?.meta?.access === "private" && channel?.meta?.membership === "closed"
// User stuff
export const userSettings = withGetter(