Mercurial > prosody-modules
diff mod_webpresence/mod_webpresence.lua @ 2348:1903add39b7c
mod_webpresence: Check that top resources are set (fixes #665)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 07 Nov 2016 17:27:18 +0100 |
parents | 9a1b3f0d0939 |
children |
line wrap: on
line diff
--- a/mod_webpresence/mod_webpresence.lua Mon Nov 07 17:24:07 2016 +0100 +++ b/mod_webpresence/mod_webpresence.lua Mon Nov 07 17:27:18 2016 +0100 @@ -29,7 +29,7 @@ end if user and host then local user_sessions = hosts[host] and hosts[host].sessions[user]; - if user_sessions then + if user_sessions and user_sessions.top_resources then status = user_sessions.top_resources[1]; if status and status.presence then message = status.presence:child_with_name("status");