trashhalo/obsidian-webhooks

TypeError: path.replace is not a function.

yaserahmady opened this issue · 4 comments

Hello there!
I can't get the plugin to work…

  • Obsidian 0.13.1 on Windows 11
  • I'm correctly logged in in the plugin settings
  • I restarted Obsidian

If I POST a request to my webhook URL like this:

curl -X "POST" "https://us-central1-obsidian-buffer.cloudfunctions.net/webhook/censored?path=Test.md"     
    -H 'Content-Type: text/plain'     
    -d "Can you see me?"

nothing happens. In Electron's console I see this:

Uncaught (in promise) TypeError: path.replace is not a function
    at ObsidianWebhooksPlugin.eval (eval at <anonymous> (app.js:1), <anonymous>:20863:32)
    at Generator.next (<anonymous>)
    at eval (eval at <anonymous> (app.js:1), <anonymous>:43:71)
    at new Promise (<anonymous>)
    at __awaiter (eval at <anonymous> (app.js:1), <anonymous>:39:12)
    at ObsidianWebhooksPlugin.applyEvent (eval at <anonymous> (app.js:1), <anonymous>:20861:16)
    at eval (eval at <anonymous> (app.js:1), <anonymous>:20838:65)

You found a bug! I'll take a look shortly. Thanks for letting me know!

Wow, didn't expect such a prompt response haha. Thank you!

@yaserahmady I just shipped a 0.0.4 of the plugin can you let me know if it works for you? 🤞

It totally works now, great job and thank you!