-
-
Notifications
You must be signed in to change notification settings - Fork 70
Improve escaping text in handlebars, with a focus on extensibility. #306
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
base: master
Are you sure you want to change the base?
Changes from all commits
3998197
29f0a9d
a7afa1b
3fb0186
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,6 +14,7 @@ public GenericFormOption() | |
| { | ||
| Headers = Array.Empty<GenericFormOptionValue>(); | ||
| Fields = Array.Empty<GenericFormOptionValue>(); | ||
| // The MediaType is left as JSON because that is what is assumed to be used in GenericFormClient.cs | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Json is not assuimed in GenericFormClient, the content type should be
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It may not be intended to be, but the body is currently treated solely as JSON per current master: https://github.com/jellyfin/jellyfin-plugin-webhook/blob/c507d/Jellyfin.Plugin.Webhook/Destinations/GenericForm/GenericFormClient.cs#L52-L58 |
||
| } | ||
|
|
||
| /// <summary> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| namespace Jellyfin.Plugin.Webhook.Destinations; | ||
|
|
||
| /// <summary> | ||
| /// The type of notification. | ||
| /// </summary> | ||
| public enum WebhookMediaContentType | ||
| { | ||
| /// <summary> | ||
| /// Plaintext/Generic Encoding. | ||
| /// </summary> | ||
| PlainText = 0, | ||
|
|
||
| /// <summary> | ||
| /// JSON Encoded webhook payload. | ||
| /// </summary> | ||
| Json = 1, | ||
|
|
||
| /// <summary> | ||
| /// XML Encoded Webhook Payload. | ||
| /// </summary> | ||
| Xml = 2, | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably possible to set in the webui
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do have it available to set in the Generic Client via a header, though at the moment it only supports json, xml, and generic/plaintext. For the individual pre-built clients though I think it makes sense to keep it hidden, or at least on a per-client basis. Discord webhooks for example only allow for JSON, so it makes no sense to expose an option that invariably breaks functionality if changed.