Compare commits
No commits in common. "d2b8550d7fe096f8817f79a93119cc9e3df279cd" and "7b66588d18dffb5aa5fce73cb2a82409df6a146c" have entirely different histories.
d2b8550d7f
...
7b66588d18
2 changed files with 4 additions and 21 deletions
|
|
@ -32,19 +32,9 @@ async def publish_or_delete_nostr_event(event: Event, *, delete: bool = False) -
|
||||||
if signer is None:
|
if signer is None:
|
||||||
# Wallet missing, account missing, unclassified row, or
|
# Wallet missing, account missing, unclassified row, or
|
||||||
# ClientSideOnlySigner account (server can't sign for them).
|
# ClientSideOnlySigner account (server can't sign for them).
|
||||||
# Soft-fail: the HTTP / payment flow that triggered this must
|
# Soft-fail: skip the publish silently. The user can still
|
||||||
# not break. The user can still publish kind-31922/31923
|
# publish kind-31922/31923 events client-side once we have
|
||||||
# events client-side once we have that path.
|
# that path.
|
||||||
#
|
|
||||||
# Logged at WARNING, not debug: skipping the publish means the
|
|
||||||
# relay keeps serving whatever inventory it last saw, so the
|
|
||||||
# public ticket count silently stops tracking the DB. That has
|
|
||||||
# twice been discovered only by a human noticing a wrong number
|
|
||||||
# on a public page (aiolabs/events#35, #51).
|
|
||||||
logger.warning(
|
|
||||||
f"[EVENTS] No signer for wallet {event.wallet}, skipping "
|
|
||||||
f"NIP-52 {'delete' if delete else 'publish'} for event {event.id}"
|
|
||||||
)
|
|
||||||
return
|
return
|
||||||
|
|
||||||
nostr_event = await publish_event_to_nostr(
|
nostr_event = await publish_event_to_nostr(
|
||||||
|
|
|
||||||
|
|
@ -172,14 +172,7 @@ async def publish_event_to_nostr(
|
||||||
Returns the published NostrEvent for metadata storage, or None on failure.
|
Returns the published NostrEvent for metadata storage, or None on failure.
|
||||||
"""
|
"""
|
||||||
if not nostr_client:
|
if not nostr_client:
|
||||||
# WARNING, not debug: with no client the event is never queued, so
|
logger.debug("[EVENTS] No NostrClient available, skipping publish")
|
||||||
# the relay keeps serving stale inventory and nothing downstream
|
|
||||||
# can tell. At debug this skip is invisible at the INFO level
|
|
||||||
# instances actually run at (aiolabs/events#35, #51).
|
|
||||||
logger.warning(
|
|
||||||
"[EVENTS] No NostrClient, skipping NIP-52 "
|
|
||||||
f"{'delete' if delete else 'publish'} for event {event.id}"
|
|
||||||
)
|
|
||||||
return None
|
return None
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue