25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-10 16:58:46 +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.
get_version() ->
case application:get_key(ejabberd, vsn) of
undefined -> "";
{ok, Vsn} -> list_to_binary(Vsn)
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
undefined -> "";
{ok, Vsn} -> list_to_binary(Vsn)
end
end.
-spec get_myhosts() -> [binary()].