Software /
code /
prosody
Diff
plugins/mod_lastactivity.lua @ 6304:ace08821e4ee
Merge 0.10->trunk
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 04 Jul 2014 23:05:27 +0200 |
parent | 6302:76699a0ae4c4 |
child | 9224:a84dbd2e08bc |
line wrap: on
line diff
--- a/plugins/mod_lastactivity.lua Mon Jun 30 13:12:16 2014 +0200 +++ b/plugins/mod_lastactivity.lua Fri Jul 04 23:05:27 2014 +0200 @@ -19,8 +19,7 @@ local stanza = event.stanza; if not(stanza.attr.to) and stanza.attr.type == "unavailable" then local t = os.time(); - local s = stanza:child_with_name("status"); - s = s and #s.tags == 0 and s[1] or ""; + local s = stanza:get_child_text("status"); map[event.origin.username] = {s = s, t = t}; end end, 10);