Mercurial > prosody-modules
comparison mod_client_management/mod_client_management.lua @ 5683:c69320fc438b
mod_client_management: Bail out retrieving tokens for user
Fixes core/usermanager.lua:118: attempt to index a nil value (field '?')
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 29 Oct 2023 12:41:56 +0100 |
parents | f16edebb1305 |
children | 8afa0fb8a73e |
comparison
equal
deleted
inserted
replaced
5682:527c747711f3 | 5683:c69320fc438b |
---|---|
183 if mech_name:match("^HT%-") then return false; end | 183 if mech_name:match("^HT%-") then return false; end |
184 return true; | 184 return true; |
185 end | 185 end |
186 | 186 |
187 local function is_client_active(client) | 187 local function is_client_active(client) |
188 if not client.full_jid then | |
189 return nil; | |
190 end | |
188 local username, host = jid.split(client.full_jid); | 191 local username, host = jid.split(client.full_jid); |
189 local account_info = usermanager.get_account_info(username, host); | 192 local account_info = usermanager.get_account_info(username, host); |
190 local last_password_change = account_info and account_info.password_updated; | 193 local last_password_change = account_info and account_info.password_updated; |
191 | 194 |
192 local status = {}; | 195 local status = {}; |