ars3niy / tdlib-purple

libpurple Telegram plugin using tdlib
Other
147 stars 32 forks source link

Limit msg backlog fetching to HISTORY_MESSAGES_ABSOLUTE_LIMIT=80 #179

Closed mk-fg closed 11 months ago

mk-fg commented 11 months ago

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.

mk-fg commented 11 months ago

Oh, sorry, wrong repository, was meant for BenWiederhake/tdlib-purple, but github used this one by default.