Changeset

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 2347:a47520a2c59d
children 2349:48686b399a88
files mod_webpresence/mod_webpresence.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
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");