Split RSS bots into their own category

New RSS_TYPES category with a /rss-bots page, sidebar entry, homepage tile, and an
explanation that RSS bots post a feed to a channel — share the channel link, not
the user. Remove rss from the Bots page (types table + create dropdown); the RSS
Bots page has a '+ New RSS Bot' button that only creates rss bots, with feed URL +
per hour/day/week fields shown directly (no bot-type select).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Jon
2026-06-05 23:43:45 +01:00
parent 87029f6d2a
commit 895cc6ddfa
5 changed files with 53 additions and 29 deletions

View File

@@ -71,9 +71,11 @@ def _enrich(profiles: list[dict]) -> list[dict]:
def _category(bot_type: str) -> str:
"""Which sidebar category a profile belongs to: users / businesses / bots."""
"""Which sidebar category a profile belongs to: users / businesses / rss-bots / bots."""
if bot_type in pm.BUSINESS_TYPES:
return "businesses"
if bot_type in pm.RSS_TYPES:
return "rss-bots"
if bot_type in pm.USER_TYPES:
return "users"
return "bots"
@@ -144,6 +146,17 @@ async def bots_page(request: Request):
})
@app.get("/rss-bots", response_class=HTMLResponse)
async def rss_bots_page(request: Request):
if redir := _redirect_if_unauth(request):
return redir
items = _enrich([p for p in db.list_profiles() if p["bot_type"] in pm.RSS_TYPES])
return TEMPLATES.TemplateResponse(request, "list.html", {
"tab": "rss-bots", "items": items, "create_types": pm.RSS_TYPES,
"nav_active": "rss-bots",
})
RELAY_KINDS = {"chat": "Chat Relay", "file": "File Relay", "message": "Message Relay"}