Skip to content

Commit

Permalink
Fix compilation with Erlang/OTP 27: don't use the reserved word 'maybe'
Browse files Browse the repository at this point in the history
  • Loading branch information
badlop committed Feb 15, 2024
1 parent bdc7d05 commit 6c32792
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/ejabberd_auth.erl
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ user_exists(User, Server) ->
false
end.

-spec user_exists_in_other_modules(atom(), binary(), binary()) -> boolean() | maybe.
-spec user_exists_in_other_modules(atom(), binary(), binary()) -> boolean() | maybe_exists.
user_exists_in_other_modules(Module, User, Server) ->
user_exists_in_other_modules_loop(
auth_modules(Server) -- [Module], User, Server).
Expand All @@ -439,7 +439,7 @@ user_exists_in_other_modules_loop([AuthModule | AuthModules], User, Server) ->
{false, _} ->
user_exists_in_other_modules_loop(AuthModules, User, Server);
{{error, _}, _} ->
maybe
maybe_exists
end.

-spec which_users_exists(list({binary(), binary()})) -> list({binary(), binary()}).
Expand Down
2 changes: 1 addition & 1 deletion src/ejabberd_auth_anonymous.erl
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ check_password(User, _AuthzId, Server, _Password) ->
%% If user exists in other module, reject anonnymous authentication
true -> false;
%% If we are not sure whether the user exists in other module, reject anon auth
maybe -> false;
maybe_exists -> false;
false -> login(User, Server)
end}.

Expand Down

0 comments on commit 6c32792

Please sign in to comment.