Merge pull request #50 from remnawave:development

Add user device event data handling and update SDK version to 2.7.1
This commit is contained in:
Artem 2026-04-03 17:08:01 +02:00 committed by GitHub
commit 102f8c1a2c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 3 deletions

View file

@ -1,7 +1,7 @@
[project]
name = "remnawave"
version = "2.7.0"
description = "A Python SDK for interacting with the Remnawave API v2.7.0."
version = "2.7.1"
description = "A Python SDK for interacting with the Remnawave API v2.7.1."
authors = [
{name = "Artem",email = "dev@forestsnet.com"}
]

View file

@ -167,7 +167,10 @@ class WebhookUtility:
"""
if not WebhookUtility.is_user_hwid_devices_event(payload.event):
return None
if isinstance(payload.data, UserHwidDeviceEventDto):
return (payload.data.user, payload.data.hwid_user_device)
if isinstance(payload.data, dict):
user_data = payload.data.get("user", {})
hwid_data = payload.data.get("hwidUserDevice", {})