diff options
| author | Adam Soltys <[email protected]> | 2026-03-06 23:11:34 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-03-06 23:11:34 -0800 |
| commit | c0c53d987a17dbead4d9013372833babf4990f83 (patch) | |
| tree | 4dad215d40dce696460736463a92d1afbe67e53c | |
| parent | 2eb14876c3399608732201e51b563cefd539771c (diff) | |
| download | coinos-server-c0c53d987a17dbead4d9013372833babf4990f83.tar.gz coinos-server-c0c53d987a17dbead4d9013372833babf4990f83.zip | |
add debug logging to DM notifications
Co-Authored-By: Claude Opus 4.6 <[email protected]>
| -rw-r--r-- | lib/dmNotifications.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/dmNotifications.ts b/lib/dmNotifications.ts index afacfe0e..a09dc22f 100644 --- a/lib/dmNotifications.ts +++ b/lib/dmNotifications.ts @@ -17,15 +17,17 @@ export const listenForDMs = async () => { relay.subscribe([{ kinds: [1059], since }], { onevent: async (event) => { const pTag = event.tags.find((t) => t[0] === "p"); + l(`dm event ${event.id.slice(0, 8)} p=${pTag?.[1]?.slice(0, 12) || "none"}`); if (!pTag) return; const recipientPubkey = pTag[1]; try { const user = await getUser(recipientPubkey); - if (!user?.id) return; + if (!user?.id) { l(`dm no user for ${recipientPubkey.slice(0, 12)}`); return; } const subscriptions = await db.sMembers(`${user.id}:subscriptions`); + l(`dm user=${user.username} subs=${subscriptions?.length || 0}`); if (!subscriptions?.length) return; const payload = JSON.stringify({ |
