Filter out non-global chat from global chat

This commit is contained in:
Jon Staab
2025-07-31 13:25:40 -07:00
parent 0cc0598287
commit 831ec05012
6 changed files with 12 additions and 7 deletions

View File

@@ -6,6 +6,7 @@
* Add signer status to profile page
* Re-work bunker login flow
* Only protect events if relay authenticates
* Filter out non-global chats from global chat
# 1.2.2

View File

@@ -281,7 +281,7 @@
})
onDestroy(() => {
cleanup()
cleanup?.()
// Sveltekit calls onDestroy at the beginning of the page load for some reason
setTimeout(() => {

View File

@@ -108,7 +108,7 @@
return () => {
setChecked($page.url.pathname)
cleanup()
cleanup?.()
}
})
</script>

View File

@@ -1,11 +1,11 @@
<script lang="ts">
import {readable} from "svelte/store"
import {onMount, onDestroy} from "svelte"
import {page} from "$app/stores"
import type {Readable} from "svelte/store"
import {readable} from "svelte/store"
import {now, formatTimestampAsDate} from "@welshman/lib"
import type {TrustedEvent, EventContent} from "@welshman/util"
import {makeEvent, MESSAGE, DELETE} from "@welshman/util"
import {makeEvent, getTag, MESSAGE, DELETE} from "@welshman/util"
import {pubkey, publishThunk} from "@welshman/app"
import {slide, fade, fly} from "@lib/transition"
import Icon from "@lib/components/Icon.svelte"
@@ -123,6 +123,10 @@
continue
}
if (getTag("h", event.tags)) {
continue
}
const date = formatTimestampAsDate(event.created_at)
if (
@@ -194,7 +198,7 @@
})
onDestroy(() => {
cleanup()
cleanup?.()
// Sveltekit calls onDestroy at the beginning of the page load for some reason
setTimeout(() => {

View File

@@ -68,7 +68,7 @@
})
return () => {
cleanup()
cleanup?.()
setChecked($page.url.pathname)
}
})

View File

@@ -69,7 +69,7 @@
})
return () => {
cleanup()
cleanup?.()
setChecked($page.url.pathname)
}
})