Mentioned it briefly in dev tg chat, and you suggested to make a PR.
As also mentioned in the commit msg, this is to make initial plugin init less spammy, and to avoid endless history-fetch operations when plugin looses position in chats due to invalid (e.g. deleted) lastMessageId.
Not sure about how history fetching affects pidgin, but in bitlbee, with earlier 10_000 message limit, it melts irc down with endless spam until you mercy-kill the damn thing, so kinda nasty behavior there.
Dunno if it's worth making this an option, as afaik only times such fetch should happen are:
Plugin init - 80 lines should be enough of a "basic context" for chats there, tooi many lines will delay it unnecessarily, esp. if there are many chats.
When someone removes last message in chat, making lastMessageId invalid - this fetch should not even happen, less lines the better.
Some kind of bug or unforseen telegram behavior? - 80 is as good as any other value, 10K is probably way too much.
There were also some trailing spaces and tabs/spaces mixups in the file, cleaned-up along the way.
Mentioned it briefly in dev tg chat, and you suggested to make a PR.
As also mentioned in the commit msg, this is to make initial plugin init less spammy, and to avoid endless history-fetch operations when plugin looses position in chats due to invalid (e.g. deleted) lastMessageId.
Not sure about how history fetching affects pidgin, but in bitlbee, with earlier 10_000 message limit, it melts irc down with endless spam until you mercy-kill the damn thing, so kinda nasty behavior there.
Dunno if it's worth making this an option, as afaik only times such fetch should happen are:
There were also some trailing spaces and tabs/spaces mixups in the file, cleaned-up along the way.