Bug 25987

Summary: Can't set the avatar/update the vcard if there was no vcard present yet
Product: Telepathy Reporter: Sjoerd Simons <sjoerd>
Component: gabbleAssignee: Telepathy bugs list <telepathy-bugs>
Status: RESOLVED FIXED QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: normal    
Priority: medium Keywords: patch
Version: 0.8   
Hardware: Other   
OS: All   
URL: http://git.collabora.co.uk/?p=user/wjt/telepathy-gabble-wjt.git;a=shortlog;h=refs/heads/no-vcard-yet
Whiteboard:
i915 platform: i915 features:

Description Sjoerd Simons 2010-01-11 03:54:44 UTC
Gabble does changes to the vcard by getting the old vcard and replacing the applicable field. If it fails to get the vcard, for whatever reason, this operation gets aborted. According to XEP 0045 when there is no vcard present on the server it should return an item-not-found. When it gets this error gabble should not fail the modification but instead create a new fresh vcard
Comment 1 Will Thompson 2010-01-11 05:45:18 UTC
The attached branch against 0.8 fixes this bug, and adds a regression test.
Comment 2 Will Thompson 2010-01-11 06:07:01 UTC
Merged to 0.8 and master:

commit 1e56a445a34d428c0feefd7423983608bd04919c
Author: Will Thompson <will.thompson@collabora.co.uk>
Date:   Mon Jan 11 13:42:39 2010 +0000

    Treat <item-not-found/> as the empty vCard
    
    When we want to update our vCard, we first retrieve our vCard from the
    server. XEP-0054 says that the server MUST return <item-not-found/> if
    you have no vCard set, but we previously assumed that the server would
    return success, with an empty <vCard/> node. Prosody respects the XEP.
    So, let's treat the former case identically to the latter.
    
    Fixes: fd.o#25987
    Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>

commit 80246ee40a69a2494c79e358d3312dba329cda6e
Author: Will Thompson <will.thompson@collabora.co.uk>
Date:   Mon Jan 11 13:42:39 2010 +0000

    Treat <item-not-found/> as the empty vCard
    
    When we want to update our vCard, we first retrieve our vCard from the
    server. XEP-0054 says that the server MUST return <item-not-found/> if
    you have no vCard set, but we previously assumed that the server would
    return success, with an empty <vCard/> node. Prosody respects the XEP.
    So, let's treat the former case identically to the latter.
    
    Fixes: fd.o#25987
    Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.