Webhooks missing time variables
Quick Information
- Operating System: Linux
- Install Type: Docker
- Crafty Version: v4.8.0
What Happened?
From the documentation, the Webhooks have various time variables time_iso, time_unix, time_day, time_month, time_year but when using the example given (for discord):
Event: `{{ event_type }}` on server `{{ server_name }}`
Disco_unix 1: <t:{{ time_unix }}:T>
Disco_unix 2: <t:{{ time_unix }}:F>
Disco_unix 3: <t:{{ time_unix }}:R>
this doesn't actually show up in the Webhook (see below).
Expected result
The Webhook should have the time information in it.
Steps to reproduce
- Create a Webhook and use the time variables.
- Put the time variables in the Webhook Body.
- Trigger the Webhook.
Screenshots
Webhook not showing timestamps:
Webhooks showing timestamps (expected):
Priority/Severity
Medium
I found that the issue was that even though there is a add_time_variables method in the WebhookProvider class, it was never actually being called. I've fixed this and will be submitting a PR shortly.
Edited by Mehraz Ahmed