feat: render zap goals
This commit is contained in:
@ -64,7 +64,7 @@ export class EventPublisher {
|
||||
/**
|
||||
* Apply POW to every event
|
||||
*/
|
||||
pow(target:number, miner?: PowMiner) {
|
||||
pow(target: number, miner?: PowMiner) {
|
||||
this.#pow = target;
|
||||
this.#miner = miner;
|
||||
}
|
||||
|
@ -180,7 +180,7 @@ export class Query implements QueryBase {
|
||||
onEvent(sub: string, e: TaggedNostrEvent) {
|
||||
for (const t of this.#tracing) {
|
||||
if (t.id === sub) {
|
||||
if(t.filters.some(v => eventMatchesFilter(e, v))) {
|
||||
if (t.filters.some(v => eventMatchesFilter(e, v))) {
|
||||
this.feed.add(e);
|
||||
} else {
|
||||
this.#log("Event did not match filter, rejecting %O", e);
|
||||
|
@ -49,4 +49,4 @@ export function splitByUrl(str: string) {
|
||||
/((?:http|ftp|https|nostr|web\+nostr|magnet):\/?\/?(?:[\w+?.\w+])+(?:[a-zA-Z0-9~!@#$%^&*()_\-=+\\/?.:;',]*)?(?:[-A-Za-z0-9+&@#/%=~()_|]))/i;
|
||||
|
||||
return str.split(urlRegex);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user