Minor logging tweaks
This commit is contained in:
parent
ad48e4a787
commit
5b536040ce
|
@ -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) {
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue