Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notifications by Email #296

Closed
siredwin opened this issue Apr 14, 2020 · 10 comments
Closed

Notifications by Email #296

siredwin opened this issue Apr 14, 2020 · 10 comments
Labels
question Further information is requested

Comments

@siredwin
Copy link

If I was trying to add Email notifications, would writing a plug-in be enough?

@siredwin siredwin added the question Further information is requested label Apr 14, 2020
@jmattheis
Copy link
Member

What do you mean exactly sending emails for gotify notifications or posting messages to gotify and receive an email?

@siredwin
Copy link
Author

The latter(posting messages to gotify and receive an email?). I know I could easily do that with a script but I would like Gotify to Push to Android and send me an Email. What is the right approach?

@jmattheis
Copy link
Member

Subscribing to messages via plugins is currently not supported. See gotify/plugin-api#3 for the feature request. Like you said, you could write a script, that connects to the websocket. You can probably copy most of the script from this issue #255 and only replace the line where a desktop notification is sent.

@mat-l
Copy link

mat-l commented Apr 15, 2020

Sending a push notification to the gotify android app and as well to an email account would be great to replace the the not existing iOS app.

By this idea one could send the information to several parties, android app users and other user on iOS or PC.

I am really interested im such a feature/hack.

@siredwin
Copy link
Author

Well, connecting to the stream might work for getting messages.
It looks like the Plugin can "Send messages as an application" in the feature description.
If that is the case, I don't need to see the message details.
Since I know the application and possibly the user, I can modify how else to deliver that message, perhaps finding the same message in the stream above.
It would be nice if the Application Model can be extended to have a "extras" parameter.

@mat-l is right, the Android App is an overkill for me.

@siredwin
Copy link
Author

One more thing.
I see that stream links a message-id to an app-id.
How would I link an app to user or a message to a user?

@jmattheis
Copy link
Member

You access the stream with a client token, with this token you can retrieve the current user -> https://gotify.net/api-docs#/user/currentUser

@siredwin
Copy link
Author

Perfect! I forgot about the tokens. I will update when I come up with something.

@siredwin
Copy link
Author

@jmattheis, this actually works.
If I was to convert this whole script into a plugin, would it be ok? Or would I be breaking something else?

@siredwin siredwin reopened this Apr 18, 2020
@jmattheis
Copy link
Member

If you can implement it as a plugin, then it shouldn't be possible to break something from gotify/server :D.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Development

No branches or pull requests

3 participants