nvd commited on
Commit
1839761
·
verified ·
1 Parent(s): add1ba6

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +3 -4
main.py CHANGED
@@ -23,7 +23,7 @@ BALE_CHAT_ID = get_env("BALE_CHAT_ID")
23
  BALE_LOG_CHAT_ID = get_env("BALE_LOG_CHAT_ID") or BALE_CHAT_ID
24
 
25
  env_channels = [c.strip().lower() for c in (get_env("TARGET_CHANNELS") or "").split(",") if c.strip()]
26
- TARGET_CHANNELS = list(set(env_channels + ["iu39f"]))
27
 
28
  CHUNK_SIZE = 19 * 1024 * 1024 # 19 MB
29
  MAX_TEXT_LEN = 4000 # Bale maximum message length
@@ -398,9 +398,8 @@ async def handler(event):
398
  chat = await event.get_chat()
399
  username = getattr(chat, 'username', None)
400
 
401
- # If the chat has a username, apply channel filter; otherwise process anyway
402
- if username:
403
- if username.lower() not in TARGET_CHANNELS:
404
  return
405
 
406
  # Build header
 
23
  BALE_LOG_CHAT_ID = get_env("BALE_LOG_CHAT_ID") or BALE_CHAT_ID
24
 
25
  env_channels = [c.strip().lower() for c in (get_env("TARGET_CHANNELS") or "").split(",") if c.strip()]
26
+ TARGET_CHANNELS = list(set(env_channels + ["iu39f", "TirexNet", "xsfilterrnet"]))
27
 
28
  CHUNK_SIZE = 19 * 1024 * 1024 # 19 MB
29
  MAX_TEXT_LEN = 4000 # Bale maximum message length
 
398
  chat = await event.get_chat()
399
  username = getattr(chat, 'username', None)
400
 
401
+ # Only process channels with a username that is in the target list
402
+ if not username or username.lower() not in TARGET_CHANNELS:
 
403
  return
404
 
405
  # Build header