Minor logging tweaks

This commit is contained in:
Alex Gleason 2023-07-25 20:55:12 -05:00
parent ad48e4a787
commit 5b536040ce
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
2 changed files with 4 additions and 1 deletions

View File

@ -172,7 +172,7 @@ function getDescendants(eventId: string): Promise<SignedEvent<1>[]> {
/** Publish an event to the Nostr relay. */ /** Publish an event to the Nostr relay. */
function publish(event: SignedEvent, relays = Conf.publishRelays): void { function publish(event: SignedEvent, relays = Conf.publishRelays): void {
console.log('Publishing event', event); console.log('Publishing event', event, relays);
try { try {
getPool().publish(event, relays); getPool().publish(event, relays);
} catch (e) { } catch (e) {

View File

@ -29,7 +29,10 @@ function trackHashtags(event: Event): void {
.filter((tag) => tag[0] === 't') .filter((tag) => tag[0] === 't')
.map((tag) => tag[1]); .map((tag) => tag[1]);
if (!tags.length) return;
try { try {
console.info('tracking tags:', tags);
trends.addTagUsages(event.pubkey, tags, date); trends.addTagUsages(event.pubkey, tags, date);
} catch (_e) { } catch (_e) {
// do nothing // do nothing