Skip to content

Commit a30846f

Browse files
committed
fix(subscription): always include expire key in subscription-userinfo header
1 parent 7ee74fc commit a30846f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

app/operation/subscription.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,12 @@ def create_response_headers(user: UsersResponseWithInbounds, request_url: str, s
5353

5454
if user.data_limit:
5555
user_info["total"] = user.data_limit
56+
57+
# Always include expire key - use 0 if no expiration date
5658
if user.expire:
5759
user_info["expire"] = int(user.expire.timestamp())
60+
else:
61+
user_info["expire"] = 0
5862

5963
# Create and return headers
6064
return {

0 commit comments

Comments
 (0)