Software /
code /
prosody-modules
Changeset
5606:da69496180e7
mod_client_management: Fix traceback if no last seen timestamp available
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 14 Jul 2023 16:09:43 +0200 |
parents | 5605:b496ebc12aed |
children | 5607:c799b460f9f0 |
files | mod_client_management/mod_client_management.lua |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_client_management/mod_client_management.lua Fri Jul 14 16:04:11 2023 +0200 +++ b/mod_client_management/mod_client_management.lua Fri Jul 14 16:09:43 2023 +0200 @@ -451,7 +451,7 @@ width = math.max(#os.date("%Y-%m-%d"), #os.date("%H:%M:%S")); align = "right"; mapper = function(last_seen) - return os.date(os.difftime(os.time(), last_seen) >= 86400 and "%Y-%m-%d" or "%H:%M:%S", last_seen); + return last_seen and os.date(os.difftime(os.time(), last_seen) >= 86400 and "%Y-%m-%d" or "%H:%M:%S", last_seen); end; }; {