summaryrefslogtreecommitdiff
path: root/src/pubsub_subscription_sql.erl
diff options
context:
space:
mode:
authorEvgeny Khramtsov <ekhramtsov@process-one.net>2019-06-14 12:33:26 +0300
committerEvgeny Khramtsov <ekhramtsov@process-one.net>2019-06-14 12:33:26 +0300
commita02cff0e780bb735531594c4ece81e8628f79782 (patch)
tree6fe7d8219d14f58183be1741fcea262c216db447 /src/pubsub_subscription_sql.erl
parentReturn jid_malformed error when sending presence without nick to conference (diff)
Use new configuration validator
Diffstat (limited to 'src/pubsub_subscription_sql.erl')
-rw-r--r--src/pubsub_subscription_sql.erl8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pubsub_subscription_sql.erl b/src/pubsub_subscription_sql.erl
index 2b60ad0b..f960d038 100644
--- a/src/pubsub_subscription_sql.erl
+++ b/src/pubsub_subscription_sql.erl
@@ -172,13 +172,13 @@ val_xfield(digest_frequency = Opt, [Val]) ->
N when is_integer(N) -> N;
_ ->
Txt = {<<"Value of '~s' should be integer">>, [Opt]},
- {error, xmpp:err_not_acceptable(Txt, ejabberd_config:get_mylang())}
+ {error, xmpp:err_not_acceptable(Txt, ejabberd_option:language())}
end;
val_xfield(expire = Opt, [Val]) ->
try xmpp_util:decode_timestamp(Val)
catch _:{bad_timestamp, _} ->
Txt = {<<"Value of '~s' should be datetime string">>, [Opt]},
- {error, xmpp:err_not_acceptable(Txt, ejabberd_config:get_mylang())}
+ {error, xmpp:err_not_acceptable(Txt, ejabberd_option:language())}
end;
val_xfield(include_body = Opt, [Val]) -> xopt_to_bool(Opt, Val);
val_xfield(show_values, Vals) -> Vals;
@@ -190,7 +190,7 @@ val_xfield(subscription_depth = Opt, [Depth]) ->
N when is_integer(N) -> N;
_ ->
Txt = {<<"Value of '~s' should be integer">>, [Opt]},
- {error, xmpp:err_not_acceptable(Txt, ejabberd_config:get_mylang())}
+ {error, xmpp:err_not_acceptable(Txt, ejabberd_option:language())}
end.
%% Convert XForm booleans to Erlang booleans.
@@ -200,7 +200,7 @@ xopt_to_bool(_, <<"false">>) -> false;
xopt_to_bool(_, <<"true">>) -> true;
xopt_to_bool(Option, _) ->
Txt = {<<"Value of '~s' should be boolean">>, [Option]},
- {error, xmpp:err_not_acceptable(Txt, ejabberd_config:get_mylang())}.
+ {error, xmpp:err_not_acceptable(Txt, ejabberd_option:language())}.
%% Return a field for an XForm for Key, with data filled in, if
%% applicable, from Options.