]> granicus.if.org Git - ejabberd/commitdiff
Add ability to modify version string
authorPaweł Chmielowski <pchmielowski@process-one.net>
Thu, 7 Jun 2018 13:38:11 +0000 (15:38 +0200)
committerPaweł Chmielowski <pchmielowski@process-one.net>
Thu, 7 Jun 2018 13:38:33 +0000 (15:38 +0200)
src/ejabberd_config.erl

index 3fe4d9c715cddf567cbdb31151bbed8baaa2d94e..9e195813e24926f80b9b7cf02f143cc6fb753eef 100644 (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()].