Fix membership status
This commit is contained in:
parent
07660c9d44
commit
4f8609421c
3 changed files with 3 additions and 6 deletions
|
|
@ -1,5 +1,4 @@
|
|||
<script lang="ts">
|
||||
import Lock from "@assets/icons/lock-keyhole.svg?dataurl"
|
||||
import Hashtag from "@assets/icons/hashtag.svg?dataurl"
|
||||
import Icon from "@lib/components/Icon.svelte"
|
||||
import RoomName from "@app/components/RoomName.svelte"
|
||||
|
|
@ -22,8 +21,6 @@
|
|||
{:else}
|
||||
<img alt="Room icon" {src} class="h-6 w-6 rounded-lg" />
|
||||
{/if}
|
||||
{:else if $room?.isClosed || $room?.isPrivate}
|
||||
<Icon icon={Lock} />
|
||||
{:else}
|
||||
<Icon icon={Hashtag} />
|
||||
{/if}
|
||||
|
|
|
|||
|
|
@ -826,7 +826,7 @@ export const deriveUserSpaceMembershipStatus = (url: string) =>
|
|||
const isMember = $members.includes($pubkey)
|
||||
|
||||
for (const event of $events) {
|
||||
if (event.pubkey !== $pubkey) {
|
||||
if (!getPubkeyTagValues(event.tags).includes($pubkey!)) {
|
||||
continue
|
||||
}
|
||||
|
||||
|
|
@ -854,7 +854,7 @@ export const deriveUserRoomMembershipStatus = (url: string, h: string) =>
|
|||
const isMember = $members.includes($pubkey)
|
||||
|
||||
for (const event of $events) {
|
||||
if (event.pubkey !== $pubkey) {
|
||||
if (!getPubkeyTagValues(event.tags).includes($pubkey!)) {
|
||||
continue
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -389,7 +389,7 @@
|
|||
{#if $room?.isPrivate && $membershipStatus !== MembershipStatus.Granted}
|
||||
<div class="py-20">
|
||||
<div class="card2 col-8 m-auto max-w-md items-center text-center">
|
||||
<p class="row-2">You aren't currently a member of this room.</p>
|
||||
<p class="opacity-75">You aren't currently a member of this room.</p>
|
||||
{#if $membershipStatus === MembershipStatus.Pending}
|
||||
<Button class="btn btn-neutral btn-sm" disabled={leaving} onclick={leave}>
|
||||
<Icon icon={ClockCircle} />
|
||||
|
|
|
|||
Loading…
Reference in a new issue