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

Add ability to click on the notification to open url #66

Closed
vaisest opened this issue Apr 3, 2019 · 8 comments
Closed

Add ability to click on the notification to open url #66

vaisest opened this issue Apr 3, 2019 · 8 comments
Labels
a:feature New feature or request

Comments

@vaisest
Copy link

vaisest commented Apr 3, 2019

Example video: https://i.vgy.me/Kfzqx9.mp4

I think this should be fairly easy to implement, but a nice feature to have.

@eternal-flame-AD
Copy link
Member

Sorry but I can't access the video you have sent, but I think this might be a duplicate of gotify/server#65.

@vaisest
Copy link
Author

vaisest commented Apr 5, 2019

I don't think it is a duplicate. I only mean supporting launching a browser when tapping on the notification, and I don't think it requires a separate URL parameter as the URL can be parsed from the message content.

I made a wonky patch for myself: Turtvaiz/android@6d55729

Also, a rehosted video

@eternal-flame-AD
Copy link
Member

Okay, I got what you meant, but considering we have decided to implement actionable notifications through the newly added "extra" property in the message model in the future, the new mechanism would be able to resolve this problem, so I don't see the particular need for this. I also don't really like searching through the message content and take whatever looks like a URL and use that link as the default behavior for viewing the notification, as makes software behavior rather unpredictable.

@jmattheis what do you think?

@eternal-flame-AD
Copy link
Member

Also, as gotify aims to be both easy to use and understand, please excuse that we usually do not accept feature requests that might in some way confuse other users. However, it is really happy to see that you have came up with your own solution, and we really recommend power users to make modifications to accomodate their own needs.

@jmattheis
Copy link
Member

I also think that this should be done via an extra property. IMO things should be done explicit.

@vaisest vaisest closed this as completed Apr 8, 2019
@jmattheis jmattheis added the question Further information is requested label Apr 8, 2019
@mzoeller
Copy link
Contributor

mzoeller commented Feb 2, 2020

Would you accept a pull request where an extra called "client::click" would be interpreted by the android client?

"extras": {
        "client::click": {
            "url": "somescheme://some/link#4"
        }
    }

Or is there a better way/more general way to define actionable things?

@jmattheis
Copy link
Member

Hey @mzoeller,

sure thing, pull requests are welcome :D.

But let's define the scheme for the extras, so that is extensible and future proof. In gotify/server#151 (comment) we already have web::notification and android::notification, so I'd say we use client::notification for things that can be supported on both android and web ui.

IMO click should be an object, because in the future there may be something like javascriptEval that should be executed on click.

{
  "extras": {
    "client::notification": {
      "click": { 
        "url": "https://gotify.net"
      }
    }
  }
}

@mzoeller
Copy link
Contributor

mzoeller commented Feb 3, 2020

I've submitted a pull request: #91

@jmattheis jmattheis added a:feature New feature or request and removed question Further information is requested labels Feb 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:feature New feature or request
Development

No branches or pull requests

4 participants