Files
mautrix-telegram/pkg/gotd/telegram/auth/qrlogin/errors.go
T
2025-06-27 20:03:37 -07:00

24 lines
539 B
Go

package qrlogin
import (
"fmt"
"go.mau.fi/mautrix-telegram/pkg/gotd/tg"
)
// MigrationNeededError reports that Telegram requested DC migration to continue login.
type MigrationNeededError struct {
MigrateTo *tg.AuthLoginTokenMigrateTo
// Tried indicates that the migration was attempted.
//
// Deprecated: do not use. QR login uses migrate function passed via
// options.
Tried bool
}
// Error implements error.
func (m *MigrationNeededError) Error() string {
return fmt.Sprintf("migration to %d needed", m.MigrateTo.DCID)
}