feature(markdown): Enables markdown notifications support #32
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request enables the support for markdown being rendered properly on the client side via a
--markdown
flag (or the correspondingMARKDOWN
environment variable). This also removes the support for HTML as it is not supported on gotify mobile.This has the side effect of not allowing to add colours in the notifications, but that didn't work initially anyways.
Similarly it allows to set a
--click_to_generator
flag (CLICK_TO_GENERATOR
environment variable) that allows to make the client notification clickable when opened on mobile. Previously this behaviour implied the use of--extended_details
, but this would also force the use of HTML, which is not supported (as per #31 and my own testing).End result, the following alert would show up as follows
On web:
On the app:
The notification sends me to the generator URL specified in the alert when I click on it on mobile, and nothing happens when the generator URL is absent from the json.
For reproducibility, the templates I used are:
title.tmpl:
main.tmpl: