Drop support for legacy messages
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
import {onMount} from "svelte"
|
||||
import {page} from "$app/stores"
|
||||
import {ago, WEEK} from "@welshman/lib"
|
||||
import {GROUPS, MESSAGE, DELETE} from "@welshman/util"
|
||||
import {GROUPS, THREAD, COMMENT, MESSAGE, DELETE} from "@welshman/util"
|
||||
import {subscribe} from "@welshman/app"
|
||||
import Page from "@lib/components/Page.svelte"
|
||||
import SecondaryNav from "@lib/components/SecondaryNav.svelte"
|
||||
@@ -12,7 +12,7 @@
|
||||
import {pushModal} from "@app/modal"
|
||||
import {setChecked} from "@app/notifications"
|
||||
import {checkRelayConnection, checkRelayAuth, checkRelayAccess} from "@app/commands"
|
||||
import {decodeRelay, userRoomsByUrl, THREAD_FILTER, COMMENT_FILTER} from "@app/state"
|
||||
import {decodeRelay, userRoomsByUrl} from "@app/state"
|
||||
import {pullConservatively} from "@app/requests"
|
||||
import {notifications} from "@app/notifications"
|
||||
|
||||
@@ -56,8 +56,8 @@
|
||||
pullConservatively({
|
||||
relays,
|
||||
filters: [
|
||||
{...THREAD_FILTER, since},
|
||||
{...COMMENT_FILTER, since},
|
||||
{kinds: [THREAD], since},
|
||||
{kinds: [COMMENT], "#K": [String(THREAD)], since},
|
||||
],
|
||||
})
|
||||
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
deriveEventsForUrl,
|
||||
GENERAL,
|
||||
tagRoom,
|
||||
LEGACY_MESSAGE,
|
||||
userRoomsByUrl,
|
||||
displayChannel,
|
||||
} from "@app/state"
|
||||
@@ -47,16 +46,9 @@
|
||||
const content = popKey<string>("content") || ""
|
||||
const url = decodeRelay($page.params.relay)
|
||||
const relay = deriveRelay(url)
|
||||
const legacyRoom = room === GENERAL ? "general" : room
|
||||
const feeds = feedsFromFilter({kinds: [MESSAGE], "#h": [room]})
|
||||
|
||||
const events = throttled(
|
||||
300,
|
||||
deriveEventsForUrl(url, [
|
||||
{kinds: [MESSAGE], "#h": [room]},
|
||||
{kinds: [LEGACY_MESSAGE], "#~": [legacyRoom]},
|
||||
]),
|
||||
)
|
||||
const events = throttled(300, deriveEventsForUrl(url, [{kinds: [MESSAGE], "#h": [room]}]))
|
||||
|
||||
const ctrl = createFeedController({
|
||||
useWindowing: true,
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import {derived} from "svelte/store"
|
||||
import {page} from "$app/stores"
|
||||
import {sortBy, min, nthEq, sleep} from "@welshman/lib"
|
||||
import {getListTags, getPubkeyTagValues} from "@welshman/util"
|
||||
import {THREAD, COMMENT, getListTags, getPubkeyTagValues} from "@welshman/util"
|
||||
import {throttled} from "@welshman/store"
|
||||
import {feedFromFilters, makeIntersectionFeed, makeRelayFeed} from "@welshman/feeds"
|
||||
import {createFeedController, userMutes} from "@welshman/app"
|
||||
@@ -16,14 +16,16 @@
|
||||
import MenuSpaceButton from "@app/components/MenuSpaceButton.svelte"
|
||||
import ThreadItem from "@app/components/ThreadItem.svelte"
|
||||
import ThreadCreate from "@app/components/ThreadCreate.svelte"
|
||||
import {THREAD_FILTER, COMMENT_FILTER, decodeRelay, deriveEventsForUrl} from "@app/state"
|
||||
import {decodeRelay, deriveEventsForUrl} from "@app/state"
|
||||
import {setChecked} from "@app/notifications"
|
||||
import {pushModal} from "@app/modal"
|
||||
|
||||
const url = decodeRelay($page.params.relay)
|
||||
const feed = feedFromFilters([THREAD_FILTER, COMMENT_FILTER])
|
||||
const threads = deriveEventsForUrl(url, [THREAD_FILTER])
|
||||
const comments = deriveEventsForUrl(url, [COMMENT_FILTER])
|
||||
const threadFilter = {kinds: [THREAD]}
|
||||
const commentFilter = {kinds: [COMMENT], "#K": [String(THREAD)]}
|
||||
const feed = feedFromFilters([threadFilter, commentFilter])
|
||||
const threads = deriveEventsForUrl(url, [threadFilter])
|
||||
const comments = deriveEventsForUrl(url, [commentFilter])
|
||||
const mutedPubkeys = getPubkeyTagValues(getListTags($userMutes))
|
||||
|
||||
const events = throttled(
|
||||
|
||||
Reference in New Issue
Block a user