kenkov / kovot

Python Chatbot Framework
MIT License
4 stars 1 forks source link

Fix the post format of the Mastodon stream to append a correct mention list to a replying toot. (#7) #9

Closed kazh98 closed 5 years ago

kazh98 commented 5 years ago

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 a Respnse object corresponds to a given Message 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 and Mod objects. I set the size of this cache (CACHE_SIZE) as 16 temporarily.

Best regards.

kenkov commented 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.

kazh98 commented 5 years ago

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.