diff options
author | Philip Withnall <philip@tecnocode.co.uk> | 2011-09-02 19:27:33 +0100 |
---|---|---|
committer | Philip Withnall <philip@tecnocode.co.uk> | 2011-09-02 19:28:34 +0100 |
commit | 17dcda00c5a993989bde31d0beca5338d5937c0f (patch) | |
tree | dd27f29eef4e2e3705edc8fa0b84b1ef360737dc /backends/key-file | |
parent | bc0141fb8317caa614e930cfecbb4cf437797bc2 (diff) |
key-file: Yield when setting properties on new personas
This fixes the libsocialweb aggregation test.
Helps: bgo#657510
Diffstat (limited to 'backends/key-file')
-rw-r--r-- | backends/key-file/kf-persona-store.vala | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/backends/key-file/kf-persona-store.vala b/backends/key-file/kf-persona-store.vala index a6fb09e6..d4d075b9 100644 --- a/backends/key-file/kf-persona-store.vala +++ b/backends/key-file/kf-persona-store.vala @@ -352,10 +352,24 @@ public class Folks.Backends.Kf.PersonaStore : Folks.PersonaStore * key file */ Persona persona = new Kf.Persona (this._key_file, persona_id, this); this._personas.set (persona.iid, persona); - if (im_addresses != null) - persona.im_addresses = im_addresses; - if (web_service_addresses != null) - persona.web_service_addresses = web_service_addresses; + + try + { + if (im_addresses != null) + { + yield persona.change_im_addresses (im_addresses); + } + if (web_service_addresses != null) + { + yield persona.change_web_service_addresses ( + web_service_addresses); + } + } + catch (PropertyError e) + { + /* This should never happen. */ + throw new PersonaStoreError.CREATE_FAILED (e.message); + } /* FIXME: GroupDetails.ChangeReason is not the right enum to use here */ var personas = new HashSet<Persona> (); |