miniproto.auth.service.AuthService.handle_dc_migration
miniproto.auth.service.AuthService.handle_dc_migration
Section titled “miniproto.auth.service.AuthService.handle_dc_migration”handle_dc_migration(error: DatacenterMigration) -> types.AuthExportedAuthorization | NonePersist Telegram’s requested DC migration and export user authorization when needed.
An unauthenticated session only changes its target DC. An authenticated session also obtains an exported authorization, which the caller must import through a sender for the target DC.
Parameters:
- error (
DatacenterMigration) – Classified Telegram migration response with the targetdc_id.
Returns:
AuthExportedAuthorization | None– An exported authorization for authenticated sessions, otherwiseNone.
Raises:
InvalidDatacenter– If Telegram requests the already-selected DC.