Skip to content

Create an all-in-one handlebars file for Discord#336

Open
Kneckter wants to merge 2 commits intojellyfin:masterfrom
Kneckter:master
Open

Create an all-in-one handlebars file for Discord#336
Kneckter wants to merge 2 commits intojellyfin:masterfrom
Kneckter:master

Conversation

@Kneckter
Copy link
Copy Markdown

This update adds a new handlebar file to the Discord templates that gives a template for each NotificationType. I was able to test the following:

  • ItemAdded
  • PlaybackStart
  • PlaybackProgress
  • PlaybackStop
  • AuthenticationFailure
  • AuthenticationSuccess
  • SessionStart
  • PluginInstalled
  • PluginInstalling
  • PluginUninstalled
  • UserCreated
  • UserDeleted
  • UserLockedOut
  • UserPasswordChanged
  • UserDataSaved
  • ItemDeleted

I was not able to trigger these to confirm their formatting:

  • Generic (probably not used)
  • SubtitleDownloadFailure
  • PendingRestart (I tried with the restart with the plug-ins, but the server logs didn't push a notification)
  • TaskCompleted (I ran some tasks but the server didn't push a notification)
  • PluginInstallationCancelled (Installs were too fast to trigger this. Format should work like the other notifications)
  • PluginInstallationFailed (Format should work like the other notifications)
  • PluginUpdated (Installing an old version and then a new version didn't not cause an update notification. Format should work like the other notifications)
  • UserUpdated (I couldn't tell how this one was triggered)

This kind of setup could also be applied to other notification providers since the if_equals helper is available to all of them.

Comment thread Jellyfin.Plugin.Webhook/Templates/Discord/AllInOne.handlebars Outdated
Updated URLs in Discord template to include a leading slash.
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

Successfully merging this pull request may close these issues.

2 participants