diff options
author | Evgeniy Khramtsov <ekhramtsov@process-one.net> | 2016-03-31 11:00:29 +0300 |
---|---|---|
committer | Evgeniy Khramtsov <ekhramtsov@process-one.net> | 2016-03-31 11:00:29 +0300 |
commit | fced8dc3d926ef733775725225a437c2c1656a4f (patch) | |
tree | 7d66931a79e0767bf25ff78820619961d5bddca9 /src/mod_adhoc.erl | |
parent | Provide authzid in scream response (diff) |
Replace some ?ERR_* macros with ?ERRT_*
Diffstat (limited to 'src/mod_adhoc.erl')
-rw-r--r-- | src/mod_adhoc.erl | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/mod_adhoc.erl b/src/mod_adhoc.erl index 9947c84ac..9e0682f7d 100644 --- a/src/mod_adhoc.erl +++ b/src/mod_adhoc.erl @@ -233,7 +233,7 @@ process_sm_iq(From, To, IQ) -> process_adhoc_request(From, To, IQ, adhoc_sm_commands). process_adhoc_request(From, To, - #iq{sub_el = SubEl} = IQ, Hook) -> + #iq{sub_el = SubEl, lang = Lang} = IQ, Hook) -> ?DEBUG("About to parse ~p...", [IQ]), case adhoc:parse_request(IQ) of {error, Error} -> @@ -245,8 +245,9 @@ process_adhoc_request(From, To, of ignore -> ignore; empty -> + Txt = <<"No hook has processed this command">>, IQ#iq{type = error, - sub_el = [SubEl, ?ERR_ITEM_NOT_FOUND]}; + sub_el = [SubEl, ?ERRT_ITEM_NOT_FOUND(Lang, Txt)]}; {error, Error} -> IQ#iq{type = error, sub_el = [SubEl, Error]}; Command -> IQ#iq{type = result, sub_el = [Command]} @@ -277,7 +278,9 @@ ping_command(_Acc, _From, _To, [{<<"info">>, translate:translate(Lang, <<"Pong">>)}]}); - true -> {error, ?ERR_BAD_REQUEST} + true -> + Txt = <<"Incorrect value of 'action' attribute">>, + {error, ?ERRT_BAD_REQUEST(Lang, Txt)} end; ping_command(Acc, _From, _To, _Request) -> Acc. |