25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-20 16:15:59 +01:00

Add ability to modify version string

This commit is contained in:
Paweł Chmielowski 2018-06-07 15:38:11 +02:00
parent 1de407c420
commit 40185b6bd3

View File

@ -1070,9 +1070,16 @@ is_file_readable(Path) ->
end. end.
get_version() -> get_version() ->
case application:get_env(ejabberd, custom_vsn) of
{ok, Vsn0} when is_list(Vsn0) ->
list_to_binary(Vsn0);
{ok, Vsn1} when is_binary(Vsn1) ->
Vsn1;
_ ->
case application:get_key(ejabberd, vsn) of case application:get_key(ejabberd, vsn) of
undefined -> ""; undefined -> "";
{ok, Vsn} -> list_to_binary(Vsn) {ok, Vsn} -> list_to_binary(Vsn)
end
end. end.
-spec get_myhosts() -> [binary()]. -spec get_myhosts() -> [binary()].