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
Unrendered markdown shown in notifications #74
Comments
Would it be possible to have the option of rendering the markdown instead of stripping it? It seems feasible as Tasker autonotification modules manages to create notifications from HTML. If there is a way to render html in a notification, and the notification is in markdown, it should be feasible to render it, right? |
Sure, if it is possible then why not (:. |
I can confirm Markdown is now rendered in notifications, but inline images still are not, see #164 (comment). Maybe this issue should be reopened to track that, or should I open a new one? |
There are several limitations for notifications on android. One of them is showing pictures. There is a "BigPictureStyle" which allows to show one picture in the notification. But what about the other three images someone perhaps has added to his markdown message? Also this picture wouldn't be inline. It would always use the whole width at the end of the notification. So I think this is useless regarding our purpose... |
IMHO setting the notification picture if and only if the beginning of the markdown code is an image tag is a good compromise, that would work with the limitations you describe. |
The image would have to be extracted from the other markdown processing. But yes, on android side this should work. |
I try to keep gotify as simple as possible to reduce the potential of bugs and the cost of code maintenance. Supporting this could certainly work, but I'm against it, because this is an edge case that probably affects only a small subset of users. |
Setting a notification picture would be nice, but I think it would be better to pass it as a separate Message Extra instead of trying to do clever things with the message content. |
My use case for this is sending camera images from my home automation system. This is something which is available on other notification platforms, but I choose to use gotify since I like to keep everything local. As such I don't believe that this is something which only affects a small subset of users. As @rigrig suggested, I think the better implementation would be to have a message extra field for this. That seems simpler/cleaner than some magic markdown interpretation. |
Yeah, I'd be okay with an
Feel free to create an issue for this. |
@jmattheis Looks perfect, thanks. See #185. |
Hi,
First of all, thanks for the awesome software!
I've noticed when sending markdown messages that raw/unrendered markdown is displayed in the notification. This is particularly jarring when the first part of the message consists of a link or image.
I've attached a screenshot below to demonstrate:
Is it possible to strip the markdown formatting and just display the textual content of the message in the notification.
My client/server versions are as follows:
Client: v2.0.7 (from F-Droid)
Server: v2.0.5 (Docker)
Thanks in advance.
The text was updated successfully, but these errors were encountered: