hwid devices integration

This commit is contained in:
machka pasla
2025-10-18 22:39:56 +03:00
parent b880032b9b
commit 9f525dc7da
8 changed files with 112 additions and 13 deletions
+4 -1
View File
@@ -739,6 +739,9 @@ class SubscriptionService:
if panel_user_data.get("expireAt")
else None
)
hwid_limit = panel_user_data.get("hwidDeviceLimit")
if hwid_limit is None:
hwid_limit = self.settings.USER_HWID_DEVICE_LIMIT
return {
"user_id": panel_user_data.get("uuid"),
@@ -749,7 +752,7 @@ class SubscriptionService:
"traffic_used_bytes": panel_user_data.get("usedTrafficBytes"),
"user_bot_username": db_user.username,
"is_panel_data": True,
"max_devices": panel_user_data.get("hwidDeviceLimit"),
"max_devices": hwid_limit,
}
async def get_subscriptions_ending_soon(