Fix black formatting

This commit is contained in:
Zedifus
2025-11-19 20:05:19 +00:00
parent 931f42ec37
commit 1333ba04c0
2 changed files with 15 additions and 5 deletions

View File

@@ -77,7 +77,6 @@ def callback(called_func):
webhook["webhook_type"]
)
# Extract source context from kwargs if present
source_type = kwargs.get("source_type", "unknown")
source_id = kwargs.get("source_id", "")

View File

@@ -79,15 +79,26 @@ class WebhookFactory:
"""
# Common variables for all events
common_vars = [
"server_name", "server_id", "event_type",
"source_type", "source_id", "source_name",
"time_iso", "time_unix", "time_day", "time_month", "time_year", "time_formatted"
"server_name",
"server_id",
"event_type",
"source_type",
"source_id",
"source_name",
"time_iso",
"time_unix",
"time_day",
"time_month",
"time_year",
"time_formatted",
]
return {
"start_server": {"variables": common_vars},
"stop_server": {"variables": common_vars},
"crash_detected": {"variables": common_vars},
"backup_server": {"variables": common_vars + ["file_name", "download_link", "file_size"]},
"backup_server": {
"variables": common_vars + ["file_name", "download_link", "file_size"]
},
"jar_update": {"variables": common_vars},
"send_command": {"variables": common_vars + ["command"]},
"kill": {"variables": common_vars + ["reason"]},