Telegram icon indicating copy to clipboard operation
Telegram copied to clipboard

Upgrade MAX_ACCOUNT_COUNT

Open aerdnar opened this issue 4 years ago • 2 comments

I'm not sure if there are conflicts with this but MAX_ACCOUNT_COUNT should be high enough to not be a limit.

aerdnar avatar Aug 30 '20 23:08 aerdnar

Telegram will not (probably) increase the limit of multiple accounts, because:

  • Above 3 accounts, we can imagine that the user would probably use them for some kind of spam or attack.
  • The app currently takes longer to open if the account limit is increased too much, since the databases for all the accounts are created/loaded at startup.
  • The app needs a rework to have multiple accounts modularly (Like TgX), without slowing down the opening speed for users which have just 1-3 accounts.

If you really need a higher limit, consider making your own builds.

Your patch to increase the account limit will not work, because to increase the limit you need to modify three different locations: https://github.com/DrKLO/Telegram/blob/release-7.0.1_2065/TMessagesProj/src/main/java/org/telegram/messenger/UserConfig.java#L26 https://github.com/DrKLO/Telegram/blob/release-7.0.1_2065/TMessagesProj/jni/tgnet/Defines.h#L30 https://github.com/DrKLO/Telegram/blob/release-7.0.1_2065/TMessagesProj/jni/tgnet/ConnectionsManager.cpp#L137-L146

alissonlauffer avatar Aug 31 '20 00:08 alissonlauffer

Thanks for your answer! My pull request is more like a feature request because other clients can manage more than three accounts.

  • Spam and attack are made by scripts, that's not the problem.
  • You are right but nothing changes for 1-3 accounts.
  • TgX can manage multiple accounts but it seems to be closed source and it requires months to get new features.

Own builds require to be updated and compiled at every release that does not sound good.

This function surprised me and I'm wondering if there are other parts based on max 3 accounts limit https://github.com/DrKLO/Telegram/blob/release-7.0.1_2065/TMessagesProj/jni/tgnet/ConnectionsManager.cpp#L137-L146

aerdnar avatar Aug 31 '20 01:08 aerdnar

Increased! As a premium feature 🕺

dkaraush avatar Mar 14 '24 10:03 dkaraush