diff --git a/manager/profiles.py b/manager/profiles.py index f50062a..19f248a 100644 --- a/manager/profiles.py +++ b/manager/profiles.py @@ -159,7 +159,6 @@ class RunningBot: histories: dict[int, list[dict]] = field(default_factory=dict) # RSS bot state rss_seen: set = field(default_factory=set) # entry ids already posted - rss_items: list = field(default_factory=list) # latest fetched entries (newest first) rss_next_poll: float = 0.0 rss_gid: int | None = None # broadcast channel group id @@ -504,7 +503,6 @@ async def _rss_poll(b: "RunningBot", chat: Any, gid: int | None, config: dict, s log.error("rss fetch error: %s", e) _append_log(b, f"RSS fetch error: {e}") return - b.rss_items = entries new = [e for e in entries if e["id"] not in b.rss_seen] for e in new: b.rss_seen.add(e["id"]) @@ -521,22 +519,6 @@ async def _rss_poll(b: "RunningBot", chat: Any, gid: int | None, config: dict, s _append_log(b, f"RSS posted {len(new)} new item(s)") -async def _rss_send_latest(chat: Any, item: dict, b: "RunningBot", n: int = 3) -> None: - """Reply to a direct request (e.g. /new) with the latest feed items.""" - items = b.rss_items[:n] - if not items: - try: - await chat.api_send_text_reply(item, "No items yet — check back soon.") - except Exception: - pass - return - for e in items: - try: - await chat.api_send_text_reply(item, _rss_format(e)) - except Exception: - pass - - async def _run_bot( profile_id: int, name: str, @@ -599,7 +581,7 @@ async def _run_bot( # auto-reply greets each new contact (default lists allowed publishers) settings["autoReply"] = {"type": "text", "text": _bc_welcome(config, name)} elif bot_type == "rss": - welcome = config.get("welcome_message") or f"Subscribed to {name}. Send /new for the latest posts." + welcome = config.get("welcome_message") or f"You're subscribed to {name}." settings["autoReply"] = {"type": "text", "text": welcome} elif bot_type in ("echo", "llm", "directory", "deadmans"): welcome = config.get("welcome_message", f"Connected to {name}.") @@ -679,16 +661,7 @@ async def _run_bot( _append_log(b, f"Contact connected: {ct_name}") # echo replies on message; broadcast/others greet via the auto-reply - # configured in address settings. RSS also sends the latest items on connect. - if bot_type == "rss": - cid = ct.get("contactId") - if cid is not None: # send the latest items directly to the new contact - for e in b.rss_items[:3]: - try: - await chat.api_send_text_message( - {"chatType": "direct", "chatId": cid}, _rss_format(e)) - except Exception: - pass + # configured in address settings, so nothing to do on connect here. elif tag == "newChatItems": items = evt.get("chatItems", []) @@ -743,10 +716,6 @@ async def _run_bot( b, chat, config, item, chat_info, text, DEFAULT_LLM_PROMPT ) - elif bot_type == "rss" and text: - if text.strip().lower() == "/new": - await _rss_send_latest(chat, item, b) - elif bot_type == "directory" and text: await _handle_directory_message( b, chat, config, name, item, chat_info, text diff --git a/manager/templates/list.html b/manager/templates/list.html index 1bc37c9..1fab16a 100644 --- a/manager/templates/list.html +++ b/manager/templates/list.html @@ -49,7 +49,7 @@ - + @@ -229,8 +229,8 @@

The bot watches this feed and broadcasts new posts to a channel it creates. - Share the channel link (from the bot's profile) with subscribers; anyone messaging - the bot can send /new for the latest. + Share the channel link (from the bot's profile) with subscribers — new posts + appear there automatically.

echoRepeats every message back to the sender — handy for testing a connection end to end.
llmChat with a local or remote LLM (OpenAI-compatible, e.g. Ollama). Give it context, it replies to your messages.
rssWatches an RSS/Atom feed and broadcasts new posts to a channel it creates. Subscribers join the channel; send /new for the latest.
rssWatches an RSS/Atom feed and broadcasts new posts to a channel it creates. Subscribers join the channel to receive them.
broadcastRelays messages from authorized publishers out to all of the bot's contacts.
supportBusiness inbox — auto-replies with a welcome message and collects incoming inquiries.
directoryDirectory service for discovering and listing groups or contacts.