mirror of
https://github.com/coracle-social/coracle.git
synced 2024-09-30 00:41:12 +00:00
Compare commits
4 Commits
0acf627870
...
fb32bf8ccc
Author | SHA1 | Date | |
---|---|---|---|
|
fb32bf8ccc | ||
|
95c08ba3b9 | ||
|
5075bccd1a | ||
|
67fe524dd1 |
@ -1,5 +1,7 @@
|
||||
# Changelog
|
||||
|
||||
# 0.4.9
|
||||
|
||||
# 0.4.8
|
||||
|
||||
- [x] Add support for kind 10050 relay lists
|
||||
|
@ -5,6 +5,8 @@
|
||||
export let address
|
||||
|
||||
const meta = deriveGroupMeta(address)
|
||||
|
||||
$: display = displayGroupMeta($meta)
|
||||
</script>
|
||||
|
||||
<span class={$$props.class}>{displayGroupMeta($meta)}</span>
|
||||
<span class={$$props.class} class:text-neutral-400={display === '[no name]'}>{display}</span>
|
||||
|
@ -149,7 +149,7 @@
|
||||
|
||||
const startZap = () => {
|
||||
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]
|
||||
|
||||
router
|
||||
|
@ -16,6 +16,7 @@
|
||||
import NotificationReplies from "src/app/views/NotificationReplies.svelte"
|
||||
import {router} from "src/app/util/router"
|
||||
import {
|
||||
pubkey,
|
||||
session,
|
||||
settings,
|
||||
markAsSeen,
|
||||
@ -146,7 +147,7 @@
|
||||
<div class="h-px w-full bg-neutral-600" />
|
||||
</div>
|
||||
{/if}
|
||||
{#if !notification.event}
|
||||
{#if notification.event?.pubkey !== $pubkey}
|
||||
<NotificationMention {notification} />
|
||||
{:else if activeTab === allTabs[0]}
|
||||
<NotificationReplies {notification} />
|
||||
|
@ -1,6 +1,7 @@
|
||||
<script lang="ts">
|
||||
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 {appName} from "src/partials/state"
|
||||
import {showInfo} from "src/partials/Toast.svelte"
|
||||
@ -28,8 +29,13 @@
|
||||
const searchWords = q => pluck("name", $searchTopics(q))
|
||||
|
||||
const submit = () => {
|
||||
if (!equals($settings, values)) {
|
||||
publishSettings(values)
|
||||
}
|
||||
|
||||
if (!equals(mutedPubkeys, Array.from($userMutes))) {
|
||||
updateSingleton(MUTES, () => mutedPubkeys.map(mention))
|
||||
}
|
||||
|
||||
showInfo("Your preferences have been saved!")
|
||||
}
|
||||
|
@ -31,8 +31,8 @@ export const readGroupMeta = (event: TrustedEvent) => {
|
||||
moderators: event.tags.filter(nthEq(0, 'p')),
|
||||
identifier: meta.d,
|
||||
name: meta.name || "",
|
||||
about: meta.about || "",
|
||||
banner: meta.banner || "",
|
||||
about: meta.about || meta.description || "",
|
||||
image: meta.image || meta.picture || "",
|
||||
listing_is_public: isSignedEvent(event),
|
||||
} as PublishedGroupMeta
|
||||
|
@ -721,6 +721,13 @@ export const updateSingleton = async (kind: number, modifyTags: ModifyTags) => {
|
||||
|
||||
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})
|
||||
}
|
||||
|
||||
|
@ -527,7 +527,7 @@ export const listenForMessages = (pubkeys: string[]) => {
|
||||
forcePlatform: false,
|
||||
relays: hints.Messages(pubkeys).getUrls(),
|
||||
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], "#p": allPubkeys}),
|
||||
],
|
||||
|
@ -252,7 +252,7 @@ export const defaultSettings = {
|
||||
}
|
||||
|
||||
export const settings = withGetter(
|
||||
derived(session, $session => ({...defaultSettings, ...$session.settings})),
|
||||
derived(session, $session => ({...defaultSettings, ...$session?.settings})),
|
||||
)
|
||||
|
||||
export const getSetting = k => prop(k, settings.get())
|
||||
@ -1022,6 +1022,7 @@ export const createNotificationGroups = ($notifications, kinds) => {
|
||||
return e
|
||||
}
|
||||
|
||||
const $pubkey = pubkey.get()
|
||||
const groups = {}
|
||||
|
||||
// Group notifications by event
|
||||
@ -1033,7 +1034,7 @@ export const createNotificationGroups = ($notifications, kinds) => {
|
||||
const parentId = Tags.fromEvent(ix).whereKey("e").parent()?.value()
|
||||
const event = parentId ? repository.getEvent(parentId) : null
|
||||
|
||||
if (reactionKinds.includes(ix.kind) && !event) {
|
||||
if (reactionKinds.includes(ix.kind) && event?.pubkey !== $pubkey) {
|
||||
continue
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user