comparison mod_http_upload/mod_http_upload.lua @ 3968:bf5d91769f99

Merge commit
author tmolitor <thilo@eightysoft.de>
date Sun, 05 Apr 2020 23:39:08 +0200
parents 190e74e097ee
children f1f796e551f1
comparison
equal deleted inserted replaced
3967:0957ba6aeb99 3968:bf5d91769f99
413 module:log("info", "Storage path: '%s'", storage_path); 413 module:log("info", "Storage path: '%s'", storage_path);
414 414
415 function module.command(args) 415 function module.command(args)
416 datamanager = require "core.storagemanager".olddm; 416 datamanager = require "core.storagemanager".olddm;
417 -- luacheck: ignore 421/user 417 -- luacheck: ignore 421/user
418 if args[1] == "expire" then 418 if args[1] == "expire" and args[2] then
419 local split = require "util.jid".prepped_split; 419 local split = require "util.jid".prepped_split;
420 for i = 2, #args do 420 for i = 2, #args do
421 local user, host = split(args[i]); 421 local user, host = split(args[i]);
422 if user then 422 if user then
423 assert(expire(user, host)); 423 assert(expire(user, host));
425 for user in assert(datamanager.users(host, module.name, "list")) do 425 for user in assert(datamanager.users(host, module.name, "list")) do
426 expire(user, host); 426 expire(user, host);
427 end 427 end
428 end 428 end
429 end 429 end
430 end 430 else
431 end 431 print("prosodyctl mod_http_upload expire [host or user@host]+")
432 432 print("\tProcess upload expiry for the given list of hosts and/or users");
433 return 1;
434 end
435 end
436