set default data_key for notification targets if not provided

This commit is contained in:
arabcoders 2025-04-09 19:36:49 +03:00
parent 88163cad42
commit c2fa066669

View file

@ -292,8 +292,7 @@ class Notification(metaclass=Singleton):
raise ValueError(msg)
if "data_key" not in target["request"]:
msg = "Invalid notification target. No data_key found."
raise ValueError(msg)
target["request"]["data_key"] = "data"
if "method" in target["request"] and target["request"]["method"].upper() not in ["POST", "PUT"]:
msg = "Invalid notification target. Invalid method found."