komf icon indicating copy to clipboard operation
komf copied to clipboard

Feature Request - Separate Webhooks for Kavita & Komga

Open ThoughtzThruKeyz opened this issue 1 year ago • 11 comments

It's as the title suggests, I noticed that the discord webhook is static. When adding a new webhook, it's universal, same as when you delete one. I think it'd be a nice QOL feature to have separate web hooks for each applications rather than having entries duplicate themselves under one webhook without knowing exactly which application is necessary being updated, and or working properly.

ThoughtzThruKeyz avatar Oct 30 '24 05:10 ThoughtzThruKeyz

It might be worth it to add additional config to webhook urls like you suggest At the moment there's mediaServer: string //can be KOMGA or KAVITA variable that you can use in templates

Snd-R avatar Oct 30 '24 11:10 Snd-R

It might be worth it to add additional config to webhook urls like you suggest At the moment there's mediaServer: string //can be KOMGA or KAVITA variable that you can use in templates

Sorry for the delay to this, but do you mind expounding on how to enact this temporary suggestion you mentioned?

ThoughtzThruKeyz avatar Dec 09 '24 10:12 ThoughtzThruKeyz

The list of variables available in templates is in readme: https://github.com/Snd-R/komf?tab=readme-ov-file#template-variables or you can also view it in notification context section in webui You can either manually create/edit template files or do it through webui that's available when you visit komf url

#if(${mediaServer}=="KOMGA")
New books were added to your Komga server
#elseif(${mediaServer}=="KAVITA")
New books were added to your Kavita server
#end

image

Snd-R avatar Dec 09 '24 14:12 Snd-R

My dumbass entered this into the komf webui on the kavita/komga pages lmaooo.

Anyways, since my komga, komf, etc. runs on a seedbox, it looks like I can't edit anything on the komf url since it isn't on the same ip it's running on. When doing the cors thing for the komga application.yml would it just be http://[myip] or does it have to be http://[myip]:[port] if it's the latter, what port do I use?

Screenshot 2024-12-18 at 2 31 34 AM

ThoughtzThruKeyz avatar Dec 18 '24 08:12 ThoughtzThruKeyz

You don't need CORS for editing komf configuration. It might be your reverse proxy issue? Open browser dev console (press f12) and see what errors you get in console and network tabs

Snd-R avatar Dec 18 '24 08:12 Snd-R

Here's what I got back:

komelia error 3 komelia error 2 komelia error 1

ThoughtzThruKeyz avatar Dec 18 '24 09:12 ThoughtzThruKeyz

Did you set the correct komf address in connecton tab? It should be the same komf url as in userscript

Snd-R avatar Dec 18 '24 09:12 Snd-R

Did you set the correct komf address in connecton tab? It should be the same komf url as in userscript

Yeah, I mean when I go to the userscript it shows connected

ThoughtzThruKeyz avatar Dec 18 '24 09:12 ThoughtzThruKeyz

Did you set the correct komf address in connecton tab? It should be the same komf url as in userscript

Any insight?

ThoughtzThruKeyz avatar Dec 21 '24 22:12 ThoughtzThruKeyz

Check the network tab in browser dev settings again. See what address the /config request is calling

If that still can't figure out your issue, you can manually edit template files. You'll need to create new files in templates directory For docker it's your mounted /config directory for jar it's current folder by default. It's also possible to change templates directory with notificatons.templatesDirectory option Then you'll need to:

  • create discord or apprise directory depending on what template you need
  • for example for discord body message, create description.vm text file and fill out your template
  • restart komf All template filenames are listed in readme https://github.com/Snd-R/komf?tab=readme-ov-file#notifications

Snd-R avatar Dec 22 '24 06:12 Snd-R

Hey, long time no talk! Happy new year lol

So I was finally able to edit this, but it only lists a notification for komga? Though I can't say for sure given I haven't gotten anything on my webhook.

Image Image

ThoughtzThruKeyz avatar Feb 11 '25 05:02 ThoughtzThruKeyz