mirror of
https://github.com/bjc/prosody.git
synced 2025-04-01 20:27:39 +03:00
mod_account_activity: Fix error when no duration specified in shell command
This commit is contained in:
parent
b07c1436e7
commit
4cc122bdc0
1 changed files with 1 additions and 1 deletions
|
@ -58,7 +58,7 @@ module:add_item("shell-command", {
|
|||
host_selector = "host";
|
||||
handler = function(self, host, duration) --luacheck: ignore 212/self
|
||||
local um = require "prosody.core.usermanager";
|
||||
local duration_sec = require "prosody.util.human.io".parse_duration(duration);
|
||||
local duration_sec = require "prosody.util.human.io".parse_duration(duration or "");
|
||||
if not duration_sec then
|
||||
return false, ("Invalid duration %q - try something like \"30d\""):format(duration);
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue