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
The attached branch against 0.8 fixes this bug, and adds a regression test.
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.