bug: track started sooner
This commit is contained in:
parent
32549522d4
commit
7d4313570e
@ -1,5 +1,5 @@
|
||||
import { HexKey, TaggedRawEvent, UserMetadata } from "@snort/nostr";
|
||||
import { hexToBech32 } from "Util";
|
||||
import { hexToBech32, unixNowMs } from "Util";
|
||||
|
||||
export interface MetadataCache extends UserMetadata {
|
||||
/**
|
||||
@ -30,8 +30,8 @@ export function mapEventToProfile(ev: TaggedRawEvent) {
|
||||
pubkey: ev.pubkey,
|
||||
npub: hexToBech32("npub", ev.pubkey),
|
||||
created: ev.created_at,
|
||||
loaded: new Date().getTime(),
|
||||
...data,
|
||||
loaded: unixNowMs(),
|
||||
} as MetadataCache;
|
||||
} catch (e) {
|
||||
console.error("Failed to parse JSON", ev, e);
|
||||
|
@ -262,6 +262,7 @@ export class Connection {
|
||||
return;
|
||||
}
|
||||
|
||||
sub.Started.set(this.Address, new Date().getTime());
|
||||
this._SendSubscription(sub);
|
||||
this.Subscriptions.set(sub.Id, sub);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user