Compare commits

..

5 Commits

Author SHA1 Message Date
Jon Staab
fb32bf8ccc Fix group name/description 2024-06-24 15:27:39 -07:00
Jon Staab
95c08ba3b9 Fix default zap split 2024-06-24 15:11:35 -07:00
Jon Staab
5075bccd1a Fix white screen 2024-06-24 15:03:41 -07:00
Jon Staab
67fe524dd1 Fix some notifications 2024-06-24 14:57:45 -07:00
Jon Staab
0acf627870 Update changelog 2024-06-21 15:56:51 -07:00
9 changed files with 35 additions and 10 deletions

View File

@ -1,9 +1,17 @@
# Changelog # Changelog
# 0.4.9
# 0.4.8 # 0.4.8
- [x] Add support for kind 10050 relay lists - [x] Add support for kind 10050 relay lists
- [x] Toggle nip44 messages based on 10050 signaling - [x] Toggle nip44 messages based on 10050 signaling
- [x] Fix settings being stale until reload
- [x] Fix WoT not being applied to mute replies
- [x] Add developer donation prompt
- [x] Add WoT information to feed cards and search
- [x] Fix group updates not getting saved
- [x] Add relay hints to group/community tags
# 0.4.7 # 0.4.7

View File

@ -5,6 +5,8 @@
export let address export let address
const meta = deriveGroupMeta(address) const meta = deriveGroupMeta(address)
$: display = displayGroupMeta($meta)
</script> </script>
<span class={$$props.class}>{displayGroupMeta($meta)}</span> <span class={$$props.class} class:text-neutral-400={display === '[no name]'}>{display}</span>

View File

@ -149,7 +149,7 @@
const startZap = () => { const startZap = () => {
const zapTags = tags.whereKey("zap") const zapTags = tags.whereKey("zap")
const defaultSplit = ["zap", ...mention(note.pubkey).slice(1), "1"] const defaultSplit = ["zap", ...mention(note.pubkey).slice(1, 3), "1"]
const splits = zapTags.exists() ? zapTags.unwrap() : [defaultSplit] const splits = zapTags.exists() ? zapTags.unwrap() : [defaultSplit]
router router

View File

@ -16,6 +16,7 @@
import NotificationReplies from "src/app/views/NotificationReplies.svelte" import NotificationReplies from "src/app/views/NotificationReplies.svelte"
import {router} from "src/app/util/router" import {router} from "src/app/util/router"
import { import {
pubkey,
session, session,
settings, settings,
markAsSeen, markAsSeen,
@ -146,7 +147,7 @@
<div class="h-px w-full bg-neutral-600" /> <div class="h-px w-full bg-neutral-600" />
</div> </div>
{/if} {/if}
{#if !notification.event} {#if notification.event?.pubkey !== $pubkey}
<NotificationMention {notification} /> <NotificationMention {notification} />
{:else if activeTab === allTabs[0]} {:else if activeTab === allTabs[0]}
<NotificationReplies {notification} /> <NotificationReplies {notification} />

View File

@ -1,6 +1,7 @@
<script lang="ts"> <script lang="ts">
import {onMount} from "svelte" import {onMount} from "svelte"
import {pluck, identity} from "ramda" import {pluck, equals} from "ramda"
import {identity} from "@welshman/lib"
import {MUTES} from "@welshman/util" import {MUTES} from "@welshman/util"
import {appName} from "src/partials/state" import {appName} from "src/partials/state"
import {showInfo} from "src/partials/Toast.svelte" import {showInfo} from "src/partials/Toast.svelte"
@ -28,8 +29,13 @@
const searchWords = q => pluck("name", $searchTopics(q)) const searchWords = q => pluck("name", $searchTopics(q))
const submit = () => { const submit = () => {
publishSettings(values) if (!equals($settings, values)) {
updateSingleton(MUTES, () => mutedPubkeys.map(mention)) publishSettings(values)
}
if (!equals(mutedPubkeys, Array.from($userMutes))) {
updateSingleton(MUTES, () => mutedPubkeys.map(mention))
}
showInfo("Your preferences have been saved!") showInfo("Your preferences have been saved!")
} }

View File

@ -31,8 +31,8 @@ export const readGroupMeta = (event: TrustedEvent) => {
moderators: event.tags.filter(nthEq(0, 'p')), moderators: event.tags.filter(nthEq(0, 'p')),
identifier: meta.d, identifier: meta.d,
name: meta.name || "", name: meta.name || "",
about: meta.about || "",
banner: meta.banner || "", banner: meta.banner || "",
about: meta.about || meta.description || "",
image: meta.image || meta.picture || "", image: meta.image || meta.picture || "",
listing_is_public: isSignedEvent(event), listing_is_public: isSignedEvent(event),
} as PublishedGroupMeta } as PublishedGroupMeta

View File

@ -721,6 +721,13 @@ export const updateSingleton = async (kind: number, modifyTags: ModifyTags) => {
const template = await encryptable.reconcile(encrypt) const template = await encryptable.reconcile(encrypt)
if (window.location.origin.includes('localhost')) {
if (kind === MUTES) {
alert("Publishing mutes")
console.trace(template)
}
}
await createAndPublish({...template, content, relays}) await createAndPublish({...template, content, relays})
} }

View File

@ -527,7 +527,7 @@ export const listenForMessages = (pubkeys: string[]) => {
forcePlatform: false, forcePlatform: false,
relays: hints.Messages(pubkeys).getUrls(), relays: hints.Messages(pubkeys).getUrls(),
filters: [ filters: [
addSinceToFilter({kinds: [WRAP], "#p": [pubkey.get()]}, seconds(7, "day")), addSinceToFilter({kinds: [WRAP], "#p": [pubkey.get()]}, seconds(14, "day")),
addSinceToFilter({kinds: [4], authors: allPubkeys}), addSinceToFilter({kinds: [4], authors: allPubkeys}),
addSinceToFilter({kinds: [4], "#p": allPubkeys}), addSinceToFilter({kinds: [4], "#p": allPubkeys}),
], ],

View File

@ -252,7 +252,7 @@ export const defaultSettings = {
} }
export const settings = withGetter( export const settings = withGetter(
derived(session, $session => ({...defaultSettings, ...$session.settings})), derived(session, $session => ({...defaultSettings, ...$session?.settings})),
) )
export const getSetting = k => prop(k, settings.get()) export const getSetting = k => prop(k, settings.get())
@ -1022,6 +1022,7 @@ export const createNotificationGroups = ($notifications, kinds) => {
return e return e
} }
const $pubkey = pubkey.get()
const groups = {} const groups = {}
// Group notifications by event // Group notifications by event
@ -1033,7 +1034,7 @@ export const createNotificationGroups = ($notifications, kinds) => {
const parentId = Tags.fromEvent(ix).whereKey("e").parent()?.value() const parentId = Tags.fromEvent(ix).whereKey("e").parent()?.value()
const event = parentId ? repository.getEvent(parentId) : null const event = parentId ? repository.getEvent(parentId) : null
if (reactionKinds.includes(ix.kind) && !event) { if (reactionKinds.includes(ix.kind) && event?.pubkey !== $pubkey) {
continue continue
} }