From 2fa825be7b71fa0792343f0ead29dac7996f1df9 Mon Sep 17 00:00:00 2001 From: bwarsaw Date: Mon, 30 Jul 2001 23:11:22 +0000 Subject: HoldMessage(): Return the id of the held message record in the database. HandleRequest(): Add a note for later about syncing the held message db and the confirmation cookie. --- Mailman/ListAdmin.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Mailman/ListAdmin.py b/Mailman/ListAdmin.py index d7e5ebe0b..2f43c9004 100644 --- a/Mailman/ListAdmin.py +++ b/Mailman/ListAdmin.py @@ -158,6 +158,10 @@ class ListAdmin: assert rtype == SUBSCRIPTION status = self.__handlesubscription(data, value, comment) if status: + # BAW: Held message ids are linked to Pending cookies, allowing + # the user to cancel their post before the moderator has approved + # it. We should probably remove the cookie associated with this + # id, but we have no way currently of correlating them. :( del self.__db[id] def HoldMessage(self, msg, reason, msgdata={}): @@ -198,6 +202,7 @@ class ListAdmin: msgsubject = msg.get('subject', _('(no subject)')) data = time.time(), sender, msgsubject, reason, filename, msgdata self.__db[id] = (HELDMSG, data) + return id def __handlepost(self, record, value, comment, preserve, forward, addr): # For backwards compatibility with pre 2.0beta3 -- cgit v1.3.1