mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +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?
|
||||
Txt = ?T("Nodeprep has failed"),
|
||||
{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 ->
|
||||
IQ
|
||||
end;
|
||||
vcard_iq_set(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) ->
|
||||
case jid:nodeprep(User) of
|
||||
error ->
|
||||
|
Loading…
Reference in New Issue
Block a user