aboutsummaryrefslogtreecommitdiff
path: root/src/mod_admin_extra.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/mod_admin_extra.erl')
-rw-r--r--src/mod_admin_extra.erl7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mod_admin_extra.erl b/src/mod_admin_extra.erl
index 13a7fa33d..1b3b27d38 100644
--- a/src/mod_admin_extra.erl
+++ b/src/mod_admin_extra.erl
@@ -1003,6 +1003,13 @@ stringize(String) ->
ejabberd_regexp:greplace(String, <<"\n">>, <<"\\n">>).
get_presence(Pid) ->
+ try get_presence2(Pid) of
+ {_, _, _, _} = Res ->
+ Res
+ catch
+ _:_ -> {<<"">>, <<"">>, <<"offline">>, <<"">>}
+ end.
+get_presence2(Pid) ->
Pres = #presence{from = From} = ejabberd_c2s:get_presence(Pid),
Show = case Pres of
#presence{type = unavailable} -> <<"unavailable">>;