1
0
Fork 0
mirror of https://github.com/processone/ejabberd synced 2025-10-05 19:42:11 +02:00

Improve some type specs

This commit is contained in:
Evgeniy Khramtsov 2016-08-09 10:56:32 +03:00
parent 4ff8d7918a
commit 522a186a38
47 changed files with 437 additions and 261 deletions

View file

@ -175,17 +175,21 @@ stop(Host) ->
depends(_Host, _Opts) ->
[].
-spec remove_user(binary(), binary()) -> ok.
remove_user(User, Server) ->
LUser = jid:nodeprep(User),
LServer = jid:nameprep(Server),
Mod = gen_mod:db_mod(LServer, ?MODULE),
Mod:remove_user(LUser, LServer).
Mod:remove_user(LUser, LServer),
ok.
-spec remove_room(binary(), binary(), binary()) -> ok.
remove_room(LServer, Name, Host) ->
LName = jid:nodeprep(Name),
LHost = jid:nameprep(Host),
Mod = gen_mod:db_mod(LServer, ?MODULE),
Mod:remove_room(LServer, LName, LHost).
Mod:remove_room(LServer, LName, LHost),
ok.
get_room_config(X, RoomState, _From, Lang) ->
Config = RoomState#state.config,
@ -621,9 +625,7 @@ should_archive_muc(#message{type = groupchat,
end;
_ ->
true
end;
_ ->
false
end
end;
should_archive_muc(_) ->
false.