Taosky / telegram-search-bot

A telegram group record search bot that solves the problem of direct search inability in languages such as CJK / Telegram 群聊天记录搜索Bot,解决CJK等语言无法直接搜索问题
MIT License
356 stars 47 forks source link

自动删除搜索结果消息 #31

Closed WangBoee closed 1 year ago

WangBoee commented 1 year ago

情景

目前看来,用户搜索后选中某条记录会直接发送出去,这条消息也会被存到历史记录中并能被搜索到。

  1. 如果用户数量多,搜索次数多起来后,记录中这类消息也会很多,会影响inline显示,降低用户查找效率;
  2. 特别是相同关键词搜索次数多的情况下,可能会出现一片[**keyword**] Via XX的情况。

需求

指定时间段后删除用户发送的查询消息。如默认删除2小时前的 [***] Via XX之类的消息,或者支持自定义N小时/N天前的查询消息。

Taosky commented 1 year ago

msg_store.py:82,理论上排出了通过bot发送的消息。