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

inbox url links #345

Open
Boruch-Baum opened this issue Feb 11, 2018 · 2 comments
Open

inbox url links #345

Boruch-Baum opened this issue Feb 11, 2018 · 2 comments

Comments

@Boruch-Baum
Copy link
Contributor

Boruch-Baum commented Feb 11, 2018

Now that I have the notification inbox functioning, I see that it is displaying url links as raw html source. This is a visually annoiying bug, but how do you want to present it?

  1. Do you already have a convention / method that you use elsewhere in the project?

  2. Should the html info just be stripped and replaced with a propertized text string?

  3. Should it be a "clickable link", and if so, how?

@Boruch-Baum
Copy link
Contributor Author

Boruch-Baum commented Feb 11, 2018

I noticed now the error message "Viewing notifications is not yet implemented", generated by function sx-display. The following is a simple solution, adding a few lines to that function sx-display, but it's done without knowledge of any features of the API that might offer native features.

     (.notification_type
      (sx-message "Viewing notifications is not yet implemented")
      (let ((start 0))
       (while (string-match "\\(http[^\"]+\\)\"" .body start)
         (setq .link (match-string 1 .body))
         (setq start (match-end 0))))
      (browse-url .link))

@vermiculus
Copy link
Owner

It looks like the notification is indeed only available as straight-up HTML, so it looks like we'll have to deal with it on those terms.

I'll make code comments on #348.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants