xtrime-ru / TelegramRSS

Convert telegram posts to RSS or json in amphp server
https://tg.i-c-a.su
MIT License
229 stars 40 forks source link

Trouble with cache/forbidden-peers.csv #13

Open eljusto opened 2 years ago

eljusto commented 2 years ago

I've encountered an issue while configuring TelegramRSS. At first, I made a request /rss/addmeto when I had no active session and got error: No sessions available. Call /system/addSession?session=%session_name% or restart server with --session option. Then I logged in as a bot and the following request /RSS/breakingmash responded with BOT_METHOD_INVALID. These two results are cached in forbidden-peers.csv so all the next requests to addmeto and breakingmash answered with errors despite a correct session. I assume that there should be a way to invalidate the cache.

xtrime-ru commented 2 years ago

Hi! Thanks for feedback!

Currently cache invalidation can be made manually: 1) Stop TelegramRSS 2) Edit/remove forbidden-peers.csv 3) Start

This was hotfix to fight against high amount of requests to tg.i-c-a.su from different IP addresses to same invalid channels.

I will be glad to merge your pull requests, if you have need in such feature. For example add created_ts to csv + ttl in settings....