GNOME Bugzilla – Bug 680774
Migrate existing accounts into libaccounts
Last modified: 2012-08-16 15:06:27 UTC
We should do it using empathy-sanity-cleaning.
Created attachment 220857 [details] [review] migrate existing TP accounts to libaccounts
I don't think this is the right way to migrate accounts. If 2 jabber accounts have "foo@gmail.com" (it's common when having facebook and gtalk), they will have the same object path with just a '0' and '1' appended. With your patch you delete both then recreate both and nothing guarantee that the suffix number won't be inversed. Account spec has a "Supersedes" property for this. I see no benefit in using EmpathyAccountSettings, TpAccountRequest can be used directly in this case. None of the GOA accounts can be migrated since we cannot delete them. Just hardcoding the known services is ugly IMO. So I suggest to simply not migrate accounts in any specific storage, and only consider those from default storage. This way is safer and good enough AFAIK. This can still be improved in MC: currently a telepathy facebook account is migrated to a generic jabber account into UOA. Would be great if it could be migrated to a web authentificated facebook account. But the problem is that MC UOA plugin uses the protocol_name ("jabber") as provider, but it should used the "Service" account property instead. Sadly the new API to create accounts in MC plugins does not give that information :( Merged my code in master for now.
Created attachment 221410 [details] [review] migrate existing TP accounts to libaccounts