Account Migration (moving to a new account on the same or another server)
Kaidan should provide a mechanism to migrate a user's account. That means, it should be possible to move all data from an old account to a new one. At best, neither the user nor the contacts should notice more than a new chat address (JID).
Especially, as we have seen providers shutting down their services while new providers are starting their XMPP services in the past, account migration via the client would be handy for users.
The tool https://migrate.modernxmpp.org migrates an account via a JavaScript page. The goal is to have such a feature directly within Kaidan to make the process even simpler. We strive to make the migration as easy as possible.
There are other use cases as well:
- A server does not support what a user needs.
- A server is included in a spam blocklist.
- A user wants to set up an own server or needs to move to a public one.
QXmpp should be involved in order to even migrate data that clients such as Kaidan do not handle yet. E.g., bookmarks for XEP-0045: Multi-User Chat (MUC) since MIX (Kaidan's upcoming group chat implementation) does not need/use bookmarks.
Account Creation and Data Migration
- Create manager in QXmpp called
QXmppAccountMigrationManager
for requesting all server-side data from the old account and submitting them to the new one while using the existing managers (e.g., QXmppRosterManager, QXmppVCardManager etc.) - Add option Migrate account data to account details
- Export data via
QXmppAccountMigrationManager::exportAccountData()
and cache it to submit it later - Create new account via Kaidan's registration dialog (manual/automatic registration)
- Apply the account settings (set via the account details) of the old account to the new one
- Ask the user whether to remove the old account only from Kaidan or to delete it from the server as well
- Set the new JID via the
ClientWorker
- Import data to new account via
QXmppAccountMigrationManager::importAccountData()
- Tell user what has been migrated and what not
Data to Migrate
Here are some data types listed that could be migrated.
-
Roster including recreation of presence subscriptions -
vCard including avatar and nickname -
Bookmarks -
PubSub nodes (excluding OMEMO nodes) -
Private MIX channels -
Messages (maybe only client-side data or later via MAM, but how to handle the changed account JID and encrypted messages) -
Files (maybe only client-side data or later via MAM, but how to handle the changed account JID and encrypted files)
Informing Contacts of Migration
- Implement XEP-0283: Moved in
QXmppAccountMigrationManager
(possibly asQXmppAccountMigrationManager::informContacts()
)