Merge pull request #328 from flygoast/master
Return an empty <vCard/> element in an IQ-result when no vCard exists.
This commit is contained in:
commit
56dab7ddbe
|
@ -186,6 +186,11 @@ process_sm_iq(From, To,
|
||||||
error ->
|
error ->
|
||||||
IQ#iq{type = error,
|
IQ#iq{type = error,
|
||||||
sub_el = [SubEl, ?ERR_INTERNAL_SERVER_ERROR]};
|
sub_el = [SubEl, ?ERR_INTERNAL_SERVER_ERROR]};
|
||||||
|
[] ->
|
||||||
|
IQ#iq{type = result,
|
||||||
|
sub_el = [#xmlel{name = <<"vCard">>,
|
||||||
|
attrs = [{<<"xmlns">>, ?NS_VCARD}],
|
||||||
|
children = []}]};
|
||||||
Els -> IQ#iq{type = result, sub_el = Els}
|
Els -> IQ#iq{type = result, sub_el = Els}
|
||||||
end
|
end
|
||||||
end.
|
end.
|
||||||
|
|
Loading…
Reference in New Issue