Giter Club home page Giter Club logo

Comments (18)

lardbit avatar lardbit commented on June 1, 2024 1

I think that's a great idea. I'd definitely like to see this feature. I'll research some options when I get some time.

from nefarious.

lardbit avatar lardbit commented on June 1, 2024 1

Sounds good. I'll reopen this issue and update when it's complete.

from nefarious.

lardbit avatar lardbit commented on June 1, 2024 1

Ok, I'll setup a gotify server and test this as well. I'm using apprise + Slack so I know that's working, but maybe there's other things to consider. I'l get back to you.

from nefarious.

panmona avatar panmona commented on June 1, 2024 1

Thanks for fixing this so quickly. The test notification works now 👍

from nefarious.

DevAndrei avatar DevAndrei commented on June 1, 2024

Support for webhooks would be nice

from nefarious.

lardbit avatar lardbit commented on June 1, 2024

I like the webhooks idea. I was also thinking of using push notifications. Thoughts?

from nefarious.

lardbit avatar lardbit commented on June 1, 2024

#45 addresses this with webhook implementation. Expects webhook to accept json data. You specify the webhook url and data key.

from nefarious.

plagioriginal avatar plagioriginal commented on June 1, 2024

Hey @lardbit ,
sorry to bother with this again.

Can you add a field in which I can specify a "priority" in the json object that you send to the webhook? My push notification works with a "priority" field that we can put from 0 to 10, and the way it works currently it only goes for a 0, I would like to put it at least a 5.
I know that this a not so "generic" request, sorry for that. I already tried to hard code it into the webhook.py in my local, but has I am using docker-compose.yml it's not working properly, it never adds the "priority" to the object

edit: Maybe a field in which we could insert a JSON object as a string, in which in the end it would merge with the object that you are already sending to the webhook that we define?

Thanks

from nefarious.

lardbit avatar lardbit commented on June 1, 2024

Ok, so you just want to add a new key priority with a value of 5 to the webhook post? You're right in that it's not a generic request, but, what I could do instead would be to let users add custom json to the request. So I could add an input box where you could enter some json like the following:

{
  "priority": 5,
}

and it would simply pass that along as well to the webhook.

I should probably let users define the entire payload/body of the json and use parameter substitution to it which should work great with everyone.

For instance, you could enter something like the following to the webhook input box:

{
  "message": "Media [[media_title]] was successfully downloaded",
  "priority": 5,
}

and media_title would be replaced by the actual thing that was downloaded.

Thoughts?

from nefarious.

plagioriginal avatar plagioriginal commented on June 1, 2024

Hey,

The first solution would work perfectly in my case, but maybe allowing the entire body of the json to be changes would be more flexible.

I would settle for the thing that gives you less development work :)

Thanks!

from nefarious.

lardbit avatar lardbit commented on June 1, 2024

nefarious integrated notifications via apprise which supports all major platforms. Hopefully that resolves this.

https://github.com/caronc/apprise
#151

from nefarious.

panmona avatar panmona commented on June 1, 2024

I am trying to setup the notifications with Gotify but I receive "Notification returned an error" and in the logs of the nefarious docker container I see: Failed to send Gotify notification: Bad Request - Unsupported Parameters., error=400.
I use an url in the following format: gotifys://{hostname}/{token} as described in the Apprise documentation.

What else can I try to make this work? Can you maybe try whether it works for you?

from nefarious.

lardbit avatar lardbit commented on June 1, 2024

Is your hostname equal to localhost? nefarious is run via docker containers which means it's operating in a private network mode where it wouldn't be able to see a local instance of gotify unless you're running it in the same docker-compose.yml stack as nefarious. Is your hostname set to localhost? How/where is gotify running?

from nefarious.

lardbit avatar lardbit commented on June 1, 2024

I recommend editing the docker-compose.yml file within nefarious and adding gotify, and then you would be able to define the Notification URL as something like:

gotify://gotify:8080/your-token

Where gotify is the name of the docker service you define, and it's mapped to port 8080

from nefarious.

panmona avatar panmona commented on June 1, 2024

Is your hostname equal to localhost? nefarious is run via docker containers which means it's operating in a private network mode where it wouldn't be able to see a local instance of gotify unless you're running it in the same docker-compose.yml stack as nefarious. Is your hostname set to localhost? How/where is gotify running?

No, my instance is run on a server outside my local network and reachable by subdomain.domain.ending which I set as my hostname.

from nefarious.

lardbit avatar lardbit commented on June 1, 2024

got it. So what happens when you try and test it out via:

apprise -vv -t 'my title' -b 'my notification body' gotifys://{hostname}/{token}

That should at least tell you if the communication from apprise to your gotify server is working.

from nefarious.

panmona avatar panmona commented on June 1, 2024

got it. So what happens when you try and test it out via:

apprise -vv -t 'my title' -b 'my notification body' gotifys://{hostname}/{token}

That should at least tell you if the communication from apprise to your gotify server is working.

Good idea. I tried it out and verified that it works successfully:
image

from nefarious.

lardbit avatar lardbit commented on June 1, 2024

You're right. I was only sending the message title without the body, but I guess each service provider is different and I should have just been sending body. I updated it and it's working with my gotify server correctly.

I committed 0114761 so give it an hour or so to build out and update your installation.

Thanks for the feedback.

from nefarious.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.