Bug 25987 - Can't set the avatar/update the vcard if there was no vcard present yet
Summary: Can't set the avatar/update the vcard if there was no vcard present yet
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: gabble (show other bugs)
Version: 0.8
Hardware: Other All
: medium normal
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL: http://git.collabora.co.uk/?p=user/wj...
Whiteboard:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2010-01-11 03:54 UTC by Sjoerd Simons
Modified: 2010-01-11 06:07 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

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.