chore: bump pkgs
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@snort/system",
|
||||
"version": "1.6.0",
|
||||
"version": "1.6.1",
|
||||
"description": "Snort nostr system package",
|
||||
"type": "module",
|
||||
"main": "dist/index.js",
|
||||
|
@ -14,7 +14,7 @@ export interface TaggedNostrEvent extends NostrEvent {
|
||||
/**
|
||||
* A list of relays this event was seen on
|
||||
*/
|
||||
relays: Array<string>;
|
||||
relays?: Array<string>;
|
||||
|
||||
/**
|
||||
* Additional context
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { SortedMap, dedupe } from "@snort/shared";
|
||||
import { SortedMap, appendDedupe, dedupe } from "@snort/shared";
|
||||
import { EventExt, EventType, TaggedNostrEvent } from ".";
|
||||
import { findTag } from "./utils";
|
||||
import { EventEmitter } from "eventemitter3";
|
||||
@ -72,7 +72,7 @@ export class KeyedReplaceableNoteStore extends HookedNoteStore {
|
||||
const existing = this.#events.get(keyOnEvent);
|
||||
if (a.created_at > (existing?.created_at ?? 0)) {
|
||||
if (existing) {
|
||||
a.relays = dedupe([...(existing.relays ?? []), ...a.relays]);
|
||||
a.relays = appendDedupe(existing.relays, a.relays);
|
||||
}
|
||||
this.#events.set(keyOnEvent, a);
|
||||
changes.push(a);
|
||||
|
Reference in New Issue
Block a user