Convert to simple relay-based groups from nip29

This commit is contained in:
Jon Staab
2024-09-11 10:48:34 -07:00
parent ed365f7e38
commit 4ad67921a0
20 changed files with 363 additions and 525 deletions
+1 -7
View File
@@ -27,7 +27,7 @@
import Icon from "@lib/components/Icon.svelte"
import Button from "@lib/components/Button.svelte"
import Avatar from "@lib/components/Avatar.svelte"
import {deriveEvent} from "@app/state"
import {deriveEvent, displayReaction} from "@app/state"
import {getChatViewOptions} from "@app/editor"
export let event: TrustedEvent
@@ -66,12 +66,6 @@
const [colorName, colorValue] = colors[parseInt(hash(event.pubkey)) % colors.length]
const ps = derived(publishStatusData, $m => Object.values($m[event.id] || {}))
const displayReaction = (content: string) => {
if (content === "+") return "❤️"
if (content === "-") return "👎"
return content
}
const findStatus = ($ps: PublishStatusData[], statuses: PublishStatus[]) =>
$ps.find(({status}) => statuses.includes(status))