diff options
author | Kim Alvefur <zash@zash.se> | 2013-05-17 18:28:05 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2013-05-17 18:28:05 +0200 |
commit | fa45bdb4f28b518346217a6fdaeb6ab93d85bea0 (patch) | |
tree | f236c1234a3f12b0620e6c4b311b44a4f0527e9e | |
parent | 03e766726b8a51cf6c52a6766a96f385256d9115 (diff) | |
download | prosody-fa45bdb4f28b518346217a6fdaeb6ab93d85bea0.tar.gz prosody-fa45bdb4f28b518346217a6fdaeb6ab93d85bea0.zip |
mod_admin_telnet: Use stanza:get_child_text()
-rw-r--r-- | plugins/mod_admin_telnet.lua | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/plugins/mod_admin_telnet.lua b/plugins/mod_admin_telnet.lua index 08fe57c0..2056f1e2 100644 --- a/plugins/mod_admin_telnet.lua +++ b/plugins/mod_admin_telnet.lua @@ -538,12 +538,7 @@ function def_env.c2s:show(match_jid) count = count + 1; local status, priority = "unavailable", tostring(session.priority or "-"); if session.presence then - status = session.presence:child_with_name("show"); - if status then - status = status:get_text() or "[invalid!]"; - else - status = "available"; - end + status = session.presence:get_child_text("show") or "available"; end print(session_flags(session, { " "..jid.." - "..status.."("..priority..")" })); end |