Update main.py
Browse files
main.py
CHANGED
|
@@ -237,7 +237,7 @@ async def process_account_endpoint(account: str):
|
|
| 237 |
agent_conf = AGENTS[account]["process"]
|
| 238 |
agent_name = agent_conf["name"]
|
| 239 |
discord_id = agent_conf["discord_id"]
|
| 240 |
-
system_discord_id =
|
| 241 |
|
| 242 |
# Buscar 1 post aprovado pelo filtro mas ainda não processado
|
| 243 |
select_url = f"{supabase_url}/rest/v1/posts?select=*&account_target=eq.{account}&approved_filter=eq.true&result=is.null&limit=1"
|
|
@@ -745,7 +745,7 @@ async def run_filter_account(account: str):
|
|
| 745 |
agent_conf = AGENTS[account]["filter"]
|
| 746 |
agent_name = agent_conf["name"]
|
| 747 |
discord_id = agent_conf["discord_id"]
|
| 748 |
-
system_discord_id =
|
| 749 |
|
| 750 |
# Buscar 1 post pendente para filtro para essa conta
|
| 751 |
select_url = f"{supabase_url}/rest/v1/posts?select=*&account_target=eq.{account}&filter_message=is.null&limit=1"
|
|
@@ -929,7 +929,7 @@ async def publish_account_endpoint(account: str):
|
|
| 929 |
agent_conf = AGENTS[account]["publish"]
|
| 930 |
agent_name = agent_conf["name"]
|
| 931 |
discord_id = agent_conf["discord_id"]
|
| 932 |
-
system_discord_id =
|
| 933 |
|
| 934 |
# Buscar 1 post pronto para publicação
|
| 935 |
select_url = f"{supabase_url}/rest/v1/posts?select=*&account_target=eq.{account}&result=not.is.null&final_content_url=not.is.null&published=eq.false&or=(superior_needs_verification.is.null,superior_needs_verification.eq.false)&limit=1"
|
|
|
|
| 237 |
agent_conf = AGENTS[account]["process"]
|
| 238 |
agent_name = agent_conf["name"]
|
| 239 |
discord_id = agent_conf["discord_id"]
|
| 240 |
+
system_discord_id = AGENTS[account].get("system_discord_id", 0)
|
| 241 |
|
| 242 |
# Buscar 1 post aprovado pelo filtro mas ainda não processado
|
| 243 |
select_url = f"{supabase_url}/rest/v1/posts?select=*&account_target=eq.{account}&approved_filter=eq.true&result=is.null&limit=1"
|
|
|
|
| 745 |
agent_conf = AGENTS[account]["filter"]
|
| 746 |
agent_name = agent_conf["name"]
|
| 747 |
discord_id = agent_conf["discord_id"]
|
| 748 |
+
system_discord_id = AGENTS[account].get("system_discord_id", 0)
|
| 749 |
|
| 750 |
# Buscar 1 post pendente para filtro para essa conta
|
| 751 |
select_url = f"{supabase_url}/rest/v1/posts?select=*&account_target=eq.{account}&filter_message=is.null&limit=1"
|
|
|
|
| 929 |
agent_conf = AGENTS[account]["publish"]
|
| 930 |
agent_name = agent_conf["name"]
|
| 931 |
discord_id = agent_conf["discord_id"]
|
| 932 |
+
system_discord_id = AGENTS[account].get("system_discord_id", 0)
|
| 933 |
|
| 934 |
# Buscar 1 post pronto para publicação
|
| 935 |
select_url = f"{supabase_url}/rest/v1/posts?select=*&account_target=eq.{account}&result=not.is.null&final_content_url=not.is.null&published=eq.false&or=(superior_needs_verification.is.null,superior_needs_verification.eq.false)&limit=1"
|