forked from coracle/flotilla
Update welshman
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
import {onMount} from "svelte"
|
||||
import {page} from "$app/stores"
|
||||
import {ago, MONTH} from "@welshman/lib"
|
||||
import {GROUP_META, EVENT_TIME, THREAD, COMMENT, MESSAGE} from "@welshman/util"
|
||||
import {ROOM_META, EVENT_TIME, THREAD, COMMENT, MESSAGE} from "@welshman/util"
|
||||
import Page from "@lib/components/Page.svelte"
|
||||
import SecondaryNav from "@lib/components/SecondaryNav.svelte"
|
||||
import MenuSpace from "@app/components/MenuSpace.svelte"
|
||||
@@ -61,7 +61,7 @@
|
||||
pullConservatively({
|
||||
relays,
|
||||
filters: [
|
||||
{kinds: [GROUP_META]},
|
||||
{kinds: [ROOM_META]},
|
||||
{kinds: [THREAD, EVENT_TIME], since},
|
||||
{kinds: [COMMENT], "#K": [String(THREAD), String(EVENT_TIME)], since},
|
||||
...rooms.map(room => ({kinds: [MESSAGE], "#h": [room], since})),
|
||||
|
||||
@@ -9,11 +9,12 @@
|
||||
import type {TrustedEvent, EventContent} from "@welshman/util"
|
||||
import {
|
||||
makeEvent,
|
||||
makeRoomMeta,
|
||||
MESSAGE,
|
||||
DELETE,
|
||||
REACTION,
|
||||
GROUP_ADD_USER,
|
||||
GROUP_REMOVE_USER,
|
||||
ROOM_ADD_USER,
|
||||
ROOM_REMOVE_USER,
|
||||
} from "@welshman/util"
|
||||
import {pubkey, publishThunk, getThunkError, joinRoom, leaveRoom} from "@welshman/app"
|
||||
import {slide, fade, fly} from "@lib/transition"
|
||||
@@ -61,7 +62,7 @@
|
||||
joining = true
|
||||
|
||||
try {
|
||||
const message = await getThunkError(joinRoom(url, room))
|
||||
const message = await getThunkError(joinRoom(url, makeRoomMeta({id: room})))
|
||||
|
||||
if (message && !message.startsWith("duplicate:")) {
|
||||
return pushToast({theme: "error", message})
|
||||
@@ -77,7 +78,7 @@
|
||||
const leave = async () => {
|
||||
leaving = true
|
||||
try {
|
||||
const message = await getThunkError(leaveRoom(url, room))
|
||||
const message = await getThunkError(leaveRoom(url, makeRoomMeta({id: room})))
|
||||
|
||||
if (message && !message.startsWith("duplicate:")) {
|
||||
pushToast({theme: "error", message})
|
||||
@@ -244,7 +245,7 @@
|
||||
relays: [url],
|
||||
filters: [
|
||||
{
|
||||
kinds: [GROUP_ADD_USER, GROUP_REMOVE_USER],
|
||||
kinds: [ROOM_ADD_USER, ROOM_REMOVE_USER],
|
||||
"#p": [$pubkey!],
|
||||
"#h": [room],
|
||||
limit: 10,
|
||||
|
||||
Reference in New Issue
Block a user