# HG changeset patch # User Kim Alvefur # Date 1526766739 -7200 # Node ID 995836ee4f2690b060a239fa0b0996fd6326672e # Parent 7ee59f417c16d13f9c1baf66f88d601a4cffee42 mod_http_upload: Add an experimental prosodyctl command for expiring uploads prosodyctl mod_http_upload expire user@example.com [user2@example.com etc] diff -r 7ee59f417c16 -r 995836ee4f26 mod_http_upload/mod_http_upload.lua --- a/mod_http_upload/mod_http_upload.lua Mon May 14 20:17:49 2018 +0200 +++ b/mod_http_upload/mod_http_upload.lua Sat May 19 23:52:19 2018 +0200 @@ -1,6 +1,6 @@ -- mod_http_upload -- --- Copyright (C) 2015-2017 Kim Alvefur +-- Copyright (C) 2015-2018 Kim Alvefur -- -- This file is MIT/X11 licensed. -- @@ -324,3 +324,13 @@ }); module:log("info", "URL: <%s>; Storage path: %s", module:http_url(), storage_path); + +function module.command(args) + if args[1] == "expire" then + local split = require "util.jid".prepped_split; + for i = 2, #args do + assert(expire(split(args[i]))); + end + end +end +