aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--index.js2
-rw-r--r--lib/payments.js2
-rw-r--r--routes/nostr.js2
3 files changed, 3 insertions, 3 deletions
diff --git a/index.js b/index.js
index 8189144d..36cdb0b4 100644
--- a/index.js
+++ b/index.js
@@ -37,7 +37,7 @@ app.get("/nostr.json", nostr.identities);
app.get("/:pubkey/followers", nostr.followers);
app.get("/:pubkey/follows", nostr.follows);
app.get("/:pubkey/notes", nostr.notes);
-app.get("/:a/:b/:since/messages", nostr.messages);
+app.get("/:pubkey/:since/messages", nostr.messages);
app.get("/event/:id", nostr.event);
app.post("/event", nostr.broadcast);
diff --git a/lib/payments.js b/lib/payments.js
index 657590ee..89652ff4 100644
--- a/lib/payments.js
+++ b/lib/payments.js
@@ -81,7 +81,7 @@ export let debit = async (
export let credit = async (hash, amount, memo, ref, type = types.internal) => {
amount = parseInt(amount);
let invoice = await g(`invoice:${hash}`);
- if (!invoice) return warn("failed to credit", ref, ", invoice not found");
+ if (!invoice) return warn("failed to credit", hash, ", invoice not found");
if (!memo) ({ memo } = invoice);
let user = await g(`user:${invoice.uid}`);
diff --git a/routes/nostr.js b/routes/nostr.js
index ad9f55aa..47ceaa25 100644
--- a/routes/nostr.js
+++ b/routes/nostr.js
@@ -70,7 +70,7 @@ export default {
messages = await Promise.all(
messages.map(async id => {
let m = await g(`ev:${id}`);
- let k = m.pubkey === pubkey ? m.tags[0].p : m.pubkey;
+ let k = m.pubkey === pubkey ? m.tags[0][1] : m.pubkey;
let uid = await g(`user:${k}`);
m.user = await g(`user:${uid}`);
return m;