mirror of
https://github.com/coracle-social/coracle.git
synced 2024-09-30 00:41:12 +00:00
Fix some notifications
This commit is contained in:
parent
0acf627870
commit
67fe524dd1
@ -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!")
|
||||
}
|
||||
|
@ -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}),
|
||||
],
|
||||
|
@ -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