Closed kazh98 closed 5 years ago
Hi kazh98,
Thanks for your continual contribution to Mastodon stream! I apreciate your precious implementation with cache algorithm. I confirmed now your stream can correctly reply to the original toot users, so I merged it to master branch.
By the way, I will implement the idea in #7 for new class Adapter
in following few days and share it with you in the #7 issue.
By the way, I will implement the idea in #7 for new class Adapter in following few days and share it with you in the #7 issue.
I got it! Thanks.
Dear kenkov-san,
Thank you for giving me your advice in issue #7.
Reversing the dependency between
Bot
and a stream object implicitly means that aRespnse
object corresponds to a givenMessage
object. This implies that we can solve issue #7 by only remembering (additional) informations of recent received toots. Hence, this pull requests add caching informations of recent received toots to _TootListener class.This implementation can add a correct account list to a replying toot while it hide informations depended on Mastodon API from
Bot
andMod
objects. I set the size of this cache (CACHE_SIZE
) as 16 temporarily.Best regards.