Mercurial > prosody-modules
comparison mod_client_management/mod_client_management.lua @ 5370:d9d52ad8c1ae
mod_client_management: Fix type confusion
client_selector : string, not some sort of table?
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 25 Apr 2023 22:12:02 +0200 |
parents | 1a58a11407ac |
children | b2d51c6ae89a |
comparison
equal
deleted
inserted
replaced
5369:1a58a11407ac | 5370:d9d52ad8c1ae |
---|---|
275 | 275 |
276 return active_clients; | 276 return active_clients; |
277 end | 277 end |
278 | 278 |
279 function revoke_client_access(username, client_selector) | 279 function revoke_client_access(username, client_selector) |
280 if client_selector.id then | 280 if client_selector then |
281 local c_type, c_id = client_selector.id:match("^(%w+)/(.+)$"); | 281 local c_type, c_id = client_selector:match("^(%w+)/(.+)$"); |
282 if c_type == "client" then | 282 if c_type == "client" then |
283 local client = client_store:get_key(username, c_id); | 283 local client = client_store:get_key(username, c_id); |
284 if not client then | 284 if not client then |
285 return nil, "item-not-found"; | 285 return nil, "item-not-found"; |
286 end | 286 end |