Skip to content

Commit

Permalink
add active status to external config
Browse files Browse the repository at this point in the history
  • Loading branch information
erfjab committed Jul 16, 2024
1 parent 94daa58 commit cf649fd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/subscription/share.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from . import *

if TYPE_CHECKING:
from app.models.user import UserResponse
from app.models.user import UserResponse, UserStatus

from config import (ACTIVE_STATUS_TEXT, DISABLED_STATUS_TEXT,
EXPIRED_STATUS_TEXT, LIMITED_STATUS_TEXT,
Expand Down Expand Up @@ -145,7 +145,8 @@ def generate_subscription(

if config_format == "v2ray":
config = "\n".join(generate_v2ray_links(**kwargs))
config += "\n" + EXTERNAL_CONFIG
if user.status == UserStatus.active:
config += "\n" + EXTERNAL_CONFIG
elif config_format == "clash-meta":
config = generate_clash_subscription(**kwargs, is_meta=True)
elif config_format == "clash":
Expand Down

0 comments on commit cf649fd

Please sign in to comment.