Software /
code /
prosody-modules
Changeset
3011:995836ee4f26
mod_http_upload: Add an experimental prosodyctl command for expiring uploads
prosodyctl mod_http_upload expire user@example.com [user2@example.com etc]
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 19 May 2018 23:52:19 +0200 |
parents | 3010:7ee59f417c16 |
children | 3012:1380ae0e003f |
files | mod_http_upload/mod_http_upload.lua |
diffstat | 1 files changed, 11 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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 +