Add a FAQ about DC migration

This commit is contained in:
Dan 2019-06-11 15:59:39 +02:00
parent c8b757acee
commit 7baa00353d
2 changed files with 24 additions and 8 deletions

View File

@ -152,11 +152,26 @@ kept as aliases.
***** Alias DC
I keep getting PEER_ID_INVALID error!
-------------------------------------------
I want to migrate my account from DCX to DCY.
---------------------------------------------
The error in question is ``[400 PEER_ID_INVALID]``, and could mean several
things:
This question is often asked by people who find their account(s) always being connected to DC1 - USA (for example), but
are connecting from a place far away (e.g DC4 - Europe), thus resulting in slower interactions when using the API
because of the great physical distance between the user and its associated DC.
When registering an account for the first time, is up to Telegram to decide which DC the new user is going to be created
in, based on the phone number origin.
Even though Telegram `documentations <https://core.telegram.org/api/datacenter#user-migration>`_ state the server might
decide to automatically migrate a user in case of prolonged usages from a distant, unusual location and albeit this
mechanism is also `confirmed <https://twitter.com/telegram/status/427131446655197184>`_ to exist by Telegram itself,
it's currently not possible to have your account migrated, in any way, simply because the feature was once planned but
not yet implemented.
I keep getting PEER_ID_INVALID error!
-------------------------------------
The error in question is ``[400 PEER_ID_INVALID]``, and could mean several things:
- The chat id you tried to use is simply wrong, double check it.
- The chat id refers to a group or channel you are not a member of.

View File

@ -28,9 +28,9 @@ class GetUserDC(BaseClient):
.. note::
This information is approximate: it is based on where the user stores their profile pictures and does not by
any means tell you the user location. More info at
`FAQs <../faq#what-are-the-ip-addresses-of-telegram-data-centers>`_.
This information is approximate: it is based on where Telegram stores a user profile pictures and does not
by any means tell you the user location (i.e. a user might travel far away, but will still connect to its
assigned DC). More info at `FAQs <../faq#what-are-the-ip-addresses-of-telegram-data-centers>`_.
Parameters:
user_id (``int`` | ``str``):
@ -39,7 +39,8 @@ class GetUserDC(BaseClient):
For a contact that exists in your Telegram address book you can use his phone number (str).
Returns:
``int`` | ``None``: The DC identifier as integer, or None in case it wasn't possible to get it.
``int`` | ``None``: The DC identifier as integer, or None in case it wasn't possible to get it (i.e. the
user has no profile picture or has the privacy setting enabled).
Raises:
RPCError: In case of a Telegram RPC error.