From: Michael Tremer Date: Fri, 23 Feb 2024 19:25:51 +0000 (+0000) Subject: nopaste: Send users when this object expires X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3e24383cb78b66b483a712a7d7b8b75b1fb5b868;p=ipfire.org.git nopaste: Send users when this object expires Signed-off-by: Michael Tremer --- diff --git a/src/web/nopaste.py b/src/web/nopaste.py index 90dc5a2a..33d50905 100644 --- a/src/web/nopaste.py +++ b/src/web/nopaste.py @@ -60,6 +60,10 @@ class CreateHandler(base.AnalyticsMixin, base.BaseHandler): # Send a message to the client self.write("https://%s/view/%s\n" % (self.request.host, paste.uuid)) + # Tell the user when this expires + if paste.expires_at: + self.write(" This paste will expire at %s\n" % self.locale.format_date(paste.expires_at)) + # All done self.finish()