fix: show full alert titles, split metadata into ACTION line
ACTION carries the tag/date/URL, PRIVMSG carries the uncropped title. Removes _truncate on alert output for better readability. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1803,15 +1803,15 @@ async def _poll_once(bot, key: str, announce: bool = True) -> None:
|
|||||||
short_id = _save_result(
|
short_id = _save_result(
|
||||||
channel, name, tag, item, short_url=short_url,
|
channel, name, tag, item, short_url=short_url,
|
||||||
)
|
)
|
||||||
title = _truncate(item["title"]) if item["title"] else "(no title)"
|
title = item["title"] or "(no title)"
|
||||||
date = item.get("date", "")
|
date = item.get("date", "")
|
||||||
line = f"[{name}/{tag}/{short_id}]"
|
meta = f"[{name}/{tag}/{short_id}]"
|
||||||
if date:
|
if date:
|
||||||
line += f" ({date})"
|
meta += f" {date}"
|
||||||
line += f" {title}"
|
|
||||||
if display_url:
|
if display_url:
|
||||||
line += f" -- {display_url}"
|
meta += f" - {display_url}"
|
||||||
await bot.send(channel, line)
|
await bot.action(channel, meta)
|
||||||
|
await bot.send(channel, title)
|
||||||
|
|
||||||
for item in new_items:
|
for item in new_items:
|
||||||
seen_list.append(item["id"])
|
seen_list.append(item["id"])
|
||||||
|
|||||||
Reference in New Issue
Block a user