aboutsummaryrefslogtreecommitdiff
path: root/src/mod_roster.erl
diff options
context:
space:
mode:
authorEvgeniy Khramtsov <ekhramtsov@process-one.net>2016-08-09 10:56:32 +0300
committerEvgeniy Khramtsov <ekhramtsov@process-one.net>2016-08-09 10:56:32 +0300
commit522a186a3822a3fdb04a423b2238aab2fcfb4b1c (patch)
tree09f280636bb14db2c5132c567b335529d758d0a0 /src/mod_roster.erl
parentChange code to reflect recent changes in fxml_gen (diff)
Improve some type specs
Diffstat (limited to 'src/mod_roster.erl')
-rw-r--r--src/mod_roster.erl7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mod_roster.erl b/src/mod_roster.erl
index 51fe08ba5..c118a61ff 100644
--- a/src/mod_roster.erl
+++ b/src/mod_roster.erl
@@ -452,6 +452,9 @@ in_subscription(_, User, Server, JID, Type, Reason) ->
process_subscription(in, User, Server, JID, Type,
Reason).
+-spec out_subscription(
+ binary(), binary(), jid(),
+ subscribed | unsubscribed | subscribe | unsubscribe) -> boolean().
out_subscription(User, Server, JID, Type) ->
process_subscription(out, User, Server, JID, Type, <<"">>).
@@ -643,12 +646,14 @@ in_auto_reply(from, out, unsubscribe) -> unsubscribed;
in_auto_reply(both, none, unsubscribe) -> unsubscribed;
in_auto_reply(_, _, _) -> none.
+-spec remove_user(binary(), binary()) -> ok.
remove_user(User, Server) ->
LUser = jid:nodeprep(User),
LServer = jid:nameprep(Server),
send_unsubscription_to_rosteritems(LUser, LServer),
Mod = gen_mod:db_mod(LServer, ?MODULE),
- Mod:remove_user(LUser, LServer).
+ Mod:remove_user(LUser, LServer),
+ ok.
%% For each contact with Subscription:
%% Both or From, send a "unsubscribed" presence stanza;