# HG changeset patch # User Kim Alvefur # Date 1478536038 -3600 # Node ID 1903add39b7c63db0018b5ffcdc541850fd3f6d6 # Parent a47520a2c59d89bc7e4bf70fb099adbdd801e446 mod_webpresence: Check that top resources are set (fixes #665) diff -r a47520a2c59d -r 1903add39b7c mod_webpresence/mod_webpresence.lua --- 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");