mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-20 16:15:59 +01:00
Return error stanza when storage doesn't support vcard update (#4266)
This commit is contained in:
parent
e99fe98db4
commit
6110f213de
@ -398,13 +398,17 @@ vcard_iq_set(#iq{from = From, lang = Lang, sub_els = [VCard]} = IQ) ->
|
|||||||
%% Should not be here?
|
%% Should not be here?
|
||||||
Txt = ?T("Nodeprep has failed"),
|
Txt = ?T("Nodeprep has failed"),
|
||||||
{stop, xmpp:err_internal_server_error(Txt, Lang)};
|
{stop, xmpp:err_internal_server_error(Txt, Lang)};
|
||||||
|
{error, not_implemented} ->
|
||||||
|
Txt = ?T("Updating the vCard is not supported by the vCard storage backend"),
|
||||||
|
{stop, xmpp:err_feature_not_implemented(Txt, Lang)};
|
||||||
ok ->
|
ok ->
|
||||||
IQ
|
IQ
|
||||||
end;
|
end;
|
||||||
vcard_iq_set(Acc) ->
|
vcard_iq_set(Acc) ->
|
||||||
Acc.
|
Acc.
|
||||||
|
|
||||||
-spec set_vcard(binary(), binary(), xmlel() | vcard_temp()) -> {error, badarg|binary()} | ok.
|
-spec set_vcard(binary(), binary(), xmlel() | vcard_temp()) ->
|
||||||
|
{error, badarg | not_implemented | binary()} | ok.
|
||||||
set_vcard(User, LServer, VCARD) ->
|
set_vcard(User, LServer, VCARD) ->
|
||||||
case jid:nodeprep(User) of
|
case jid:nodeprep(User) of
|
||||||
error ->
|
error ->
|
||||||
|
Loading…
Reference in New Issue
Block a user