Skip to content

v2.4.0: Significant performance improvement, native blockquote and syntax highlighting

Compare
Choose a tag to compare
@Rongronggg9 Rongronggg9 released this 20 Nov 16:44
· 338 commits to dev since this release
d1548fa

BREAKING CHANGES

  • Drop Python 3.7 & 3.8 support: The minimum Python version requirement is now 3.9.

Highlights

Performance enhancements

  • Reuse SSL context: Reuse SSL context as aiohttp does. This improves performance (reduce load average by ~40%) and reduces memory usage.
  • Lazy CookieJar: Lazy creating CookieJar until there is really a Cookie. This improves performance (reduce load average by ~15%) and reduces memory usage.

Additions

  • Native blockquote: <blockquote> is now rendered as a native Telegram blockquote rather than a text block wrapped with horizontal rules.
  • Syntax highlighting: <pre> is now rendered as a native Telegram code block with syntax highlighting, as long as the language is specified in the class attribute.

Enhancements

  • Custom-title-aware OPML: When importing and exporting OPML, the bot will try to distinguish if a feed is of a custom title, and preserve it if so.
  • /lang and /test as "remote" commands: /lang and /test are now recognized as "remote" commands, which means you can use them in the private chat to make the operation actually apply to the channel/group you've specified in the command. Note: /test is only available to the bot manager.
  • /user_info UX enhancement: /user_info now has a better UX. Note: /user_info is only available to the bot manager.
  • Minor enhancements: The Docker image is now based on Debian bookworm.

Bug fixes

  • Unexpected feed migration: Fix a bug causing the bot to migrate feeds to a new URL unexpectedly. More specifically, the bot will now only migrate a feed if a redirection is considered permanent (HTTP status code 301 or 308).
  • WEBP sent with wrong color space: Fix a bug causing WEBP images sent with a wrong color space.
  • Incorrect OPML format: Fix incorrect OPML format making some RSS readers unable to import the OPML file exported by the bot.
  • Mistaken watchdog feed timing: Fix a bug causing the watchdog to be feed at the wrong time.
  • Uncaught errors: Fix some uncaught errors causing messages failed to be sent.

v2.4.0: 显著提高性能、原生块状引用和语法高亮

重大变更

  • 取消对 Python 3.7 和 3.8 的支持:最低的 Python 版本要求现在是 3.9。

亮点

性能增强

  • SSL 上下文重用:像 aiohttp 那样重用 SSL 上下文。这将提高性能(将平均负载降低约 40%)并减少内存使用量。
  • 懒惰 CookieJar:懒惰创建 CookieJar,直到真正有 Cookie。这将提高性能(将平均负载降低约 15%)并减少内存使用量。

新增功能

  • 原生块状引用<blockquote> 现在被渲染为原生的 Telegram 块状引用,取代用横线包裹的文本块。
  • 语法高亮显示:只要在 class 属性中指定了语言,<pre> 现在会呈现为带有语法高亮的 Telegram 原生代码块。

增强

  • 可感知自定义标题的 OPML:在导入和导出 OPML 时,bot 会尝试判断订阅源是否具有自定义标题,如果是,则会保留它。
  • /lang/test 作为“远程”命令/lang/test 现在被认定为“远程”命令,这意味着您可以在私聊中使用它们,但使操作实际应用于您在命令中指定的频道/群组。注意:/test 仅适用于 bot 管理员。
  • /user_info UX 增强/user_info 现在有了更好的 UX。注意:/user_info 仅对 bot 管理员有效。
  • 次要的增强: Docker 映像现在基于 Debian bookworm。

Bug 修复

  • 意外迁移订阅源:修复一个导致 bot 意外将订阅源迁移到新 URL 的错误。更具体地说,bot 现在只会在重定向被视为永久性(HTTP 状态码为 301 或 308)的情况下迁移订阅源。
  • 以错误的色彩空间发送 WEBP:修复导致 WEBP 图像以错误色彩空间发送的错误。
  • 不正确的 OPML 格式:修正不正确的 OPML 格式,这导致某些 RSS 阅读器无法导入 bot 导出的 OPML 文件。
  • 错误的看门狗饲喂时序:修复导致看门狗在不正确的时间被饲喂的错误。
  • 未捕获的错误:修复一些导致消息发送失败的未捕获错误。