summaryrefslogtreecommitdiff
path: root/src/mod_last.erl
diff options
context:
space:
mode:
authorEvgeniy Khramtsov <ekhramtsov@process-one.net>2017-02-18 09:36:27 +0300
committerEvgeniy Khramtsov <ekhramtsov@process-one.net>2017-02-18 09:36:27 +0300
commit940ca9311d7097e593bddc7bfc8ed9ba504d66bc (patch)
treeca86e6f5aae6b3d142675334ace94fb21452fd35 /src/mod_last.erl
parentMerge pull request #1553 from lemenkov/config_functions_deprecation (diff)
Fix some dialyzer warnings
Diffstat (limited to 'src/mod_last.erl')
-rw-r--r--src/mod_last.erl12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/mod_last.erl b/src/mod_last.erl
index a7283fdd..f6000516 100644
--- a/src/mod_last.erl
+++ b/src/mod_last.erl
@@ -51,9 +51,8 @@
-callback import(binary(), #last_activity{}) -> ok | pass.
-callback get_last(binary(), binary()) ->
{ok, non_neg_integer(), binary()} | not_found | {error, any()}.
--callback store_last_info(binary(), binary(), non_neg_integer(), binary()) ->
- {atomic, any()}.
--callback remove_user(binary(), binary()) -> {atomic, any()}.
+-callback store_last_info(binary(), binary(), non_neg_integer(), binary()) -> any().
+-callback remove_user(binary(), binary()) -> any().
start(Host, Opts) ->
IQDisc = gen_mod:get_opt(iqdisc, Opts, fun gen_iq_handler:check_type/1,
@@ -197,7 +196,7 @@ get_last_iq(#iq{lang = Lang} = IQ, LUser, LServer) ->
xmpp:make_iq_result(IQ, #last{seconds = 0})
end.
--spec register_user(binary(), binary()) -> {atomic, any()}.
+-spec register_user(binary(), binary()) -> any().
register_user(User, Server) ->
on_presence_update(
User,
@@ -205,13 +204,12 @@ register_user(User, Server) ->
<<"RegisterResource">>,
<<"Registered but didn't login">>).
--spec on_presence_update(binary(), binary(), binary(), binary()) -> {atomic, any()}.
+-spec on_presence_update(binary(), binary(), binary(), binary()) -> any().
on_presence_update(User, Server, _Resource, Status) ->
TimeStamp = p1_time_compat:system_time(seconds),
store_last_info(User, Server, TimeStamp, Status).
--spec store_last_info(binary(), binary(), non_neg_integer(), binary()) ->
- {atomic, any()}.
+-spec store_last_info(binary(), binary(), non_neg_integer(), binary()) -> any().
store_last_info(User, Server, TimeStamp, Status) ->
LUser = jid:nodeprep(User),
LServer = jid:nameprep(Server),