mirror of
https://github.com/coracle-social/coracle.git
synced 2024-09-18 19:23:40 +00:00
Fix notifications getting re-set
This commit is contained in:
parent
23ef0a9d26
commit
d4f26abad4
@ -1,4 +1,4 @@
|
||||
import {is, uniq, prop, reject, nth, uniqBy, objOf, pick, identity} from "ramda"
|
||||
import {filter, is, uniq, prop, reject, nth, uniqBy, objOf, pick, identity} from "ramda"
|
||||
import {nip05} from "nostr-tools"
|
||||
import {noop, ensurePlural, chunk} from "hurdak/lib/hurdak"
|
||||
import {
|
||||
@ -251,7 +251,12 @@ addHandler(
|
||||
30078,
|
||||
profileHandler("last_checked", async (e, p) => {
|
||||
if (Tags.from(e).getMeta("d") === "coracle/last_checked/v1") {
|
||||
return {...p.last_checked, ...(await keys.decryptJson(e.content))}
|
||||
const updates = filter(
|
||||
([k, v]) => p.last_checked[k] || 0 < v,
|
||||
Object.entries(await keys.decryptJson(e.content))
|
||||
)
|
||||
|
||||
return {...p.last_checked, ...updates}
|
||||
}
|
||||
})
|
||||
)
|
||||
|
@ -103,7 +103,7 @@
|
||||
})}>
|
||||
<div
|
||||
class={cx("inline-block max-w-xl rounded-2xl py-2 px-4", {
|
||||
"rounded-br-none bg-gray-2 text-end text-gray-8":
|
||||
"rounded-br-none bg-gray-1 text-end text-gray-8":
|
||||
message.person.pubkey === user.getPubkey(),
|
||||
"rounded-bl-none bg-gray-7": message.person.pubkey !== user.getPubkey(),
|
||||
})}>
|
||||
|
Loading…
Reference in New Issue
Block a user