After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 680774 - Migrate existing accounts into libaccounts
Migrate existing accounts into libaccounts
Status: RESOLVED FIXED
Product: empathy
Classification: Core
Component: UOA
2.33.x
Other Linux
: Normal enhancement
: ---
Assigned To: empathy-maint
empathy-maint
Depends on:
Blocks:
 
 
Reported: 2012-07-29 10:05 UTC by Guillaume Desmottes
Modified: 2012-08-16 15:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
migrate existing TP accounts to libaccounts (5.29 KB, patch)
2012-08-10 10:14 UTC, Guillaume Desmottes
none Details | Review
migrate existing TP accounts to libaccounts (4.79 KB, patch)
2012-08-16 14:46 UTC, Xavier Claessens
none Details | Review

Description Guillaume Desmottes 2012-07-29 10:05:12 UTC
We should do it using empathy-sanity-cleaning.
Comment 1 Guillaume Desmottes 2012-08-10 10:14:28 UTC
Created attachment 220857 [details] [review]
migrate existing TP accounts to libaccounts
Comment 2 Xavier Claessens 2012-08-16 14:46:05 UTC
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.
Comment 3 Xavier Claessens 2012-08-16 14:46:41 UTC
Created attachment 221410 [details] [review]
migrate existing TP accounts to libaccounts