github Rongronggg9/RSS-to-Telegram-Bot v2.6.0
v2.6.0: Upload media to Telegraph, management enhancements

latest releases: v2.8.0, v2.7.0
3 months ago

Highlights

  • Upload media to Telegraph: When generating Telegraph posts, images as well as videos will be uploaded to Telegraph. This is to solve anti-hotlinking issues and improve the load performance of posts. This feature depends on the latest version of the media relay server (Rongronggg9/rsstt-img-relay). Those images and videos that are too large to be uploaded will still be proxied by wsrv.nl (environment variable IMAGES_WESERV_NL) or media relay server (environment variable IMG_RELAY_SERVER). Thanks #431 for inspiration.

Addition

  • Multiple managers: The environment variable MANAGER now accepts a single user ID as well as a list separated by ;, ,, (space), (linebreak), or (tab). Each user in the list will be able to manage the bot equally.
  • Customizable error logging chat: Previously, some error logs were always sent to the bot manager. To make it more flexible, a new environment variable ERROR_LOGGING_CHAT, accepting a single user/channel/group ID, has been added. If set, these error logs will be sent to the specified chat. Otherwise, the first user ID in MANAGER will be selected as default.

Enhancements

  • Strip whitespaces in <li>: Strip whitespaces (including linebreaks) in <li> (list item) to improve readability. Only the leading and trailing whitespaces (including linebreaks) are stripped.
  • Only set "force reply" in groups: Only set ReplyKeyboardForceReply to True in groups. Previously, it was also set in private chats. See also "Bug fixes" below.
  • Minor refactor: Some internal functions have been refactored to improve readability and maintainability.

Bug fixes

  • (/sub) "force reply" not cleared: Both /sub and /import set ReplyKeyboardForceReply to True to force the user to reply to the bot. However, due to a bug of Telegram, it keeps effective even if the user has made a reply, making the reply bar always reappear. Previously, a workaround has been applied to /import by deleting the prompt message containing ReplyKeyboardForceReply after the user has made a reply (see also #170). But /sub was forgotten at that time. Now the workaround has been applied to /sub too.
  • "Remote" /lang unavailable: Fix a bug preventing users from using the /lang command "remotely".

v2.6.0: 上传媒体到 Telegraph、管理增强

亮点

  • 上传媒体到 Telegraph: 在生成 Telegraph 文章时,图片和视频都将被上传到 Telegraph。这是为了解决防盗链问题和提高文章的加载性能。此功能依赖媒体反代服务器 (Rongronggg9/rsstt-img-relay) 的最新版本。由于太大而无法上传的图片和视频仍将由 wsrv.nl (环境变量 IMAGES_WESERV_NL) 或媒体反代服务器 (环境变量 IMG_RELAY_SERVER) 进行代理。感谢 #431 的启发。

新增功能

  • 多个管理员: 环境变量 MANAGER 现在既接受单个用户 ID,也接受由 ;, ,, (空格), (换行)(制表符) 分隔的列表。列表中的每个用户都可以平等地管理机器人。
  • 可自定义的错误日志会话: 先前,一些错误日志总是发送到 bot 管理员。为了使其更加灵活,添加了一个新的环境变量 ERROR_LOGGING_CHAT,其接受单个用户/频道/群组 ID。如果被设置,这些错误日志将被发送到指定的会话。否则,将选择 MANAGER 中的第一个用户 ID 作为默认值。

增强

  • 除去 <li> 中的表层空格: 除去 <li> (列表项) 中的表层空格 (包括换行符) 以提高可读性。只有前导和尾随空格 (包括换行符) 被除去。
  • 只在群组中设置“强制回复”: 只在群组中设置 ReplyKeyboardForceReplyTrue。先前,它也在私聊中被设置。另请参阅下面的“Bug 修复”。
  • 次要的重构: 重构了一些内部函数以提高可读性和可维护性。

Bug 修复

  • (/sub) “强制回复”未被清除: /sub/import 都将 ReplyKeyboardForceReply 设置为 True 以强制用户回复 bot。然而,由于 Telegram 的一个 bug,即使用户已经回复过了,它仍然有效,导致回复栏总是重新出现。先前,通过在用户回复后删除包含 ReplyKeyboardForceReply 的提示消息,为 /import 应用了变通解决方案 (另请参阅 #170)。但是 /sub 在那时被遗忘了。现在,这个变通解决方案也被应用到了 /sub 上。
  • “远程” /lang 不可用:修复阻止用户“远程”使用 /lang 命令的错误。

Don't miss a new RSS-to-Telegram-Bot release

NewReleases is sending notifications on new releases.