diff options
author | uckelman <uckelman@nomic.net> | 2010-04-30 16:41:26 +0000 |
---|---|---|
committer | uckelman <uckelman@nomic.net> | 2010-04-30 16:41:26 +0000 |
commit | 07ad87efa0f7f5ff0e503efb16c26314ffb1d31f (patch) | |
tree | b96636855e9fba5dfa55af67cb78764b15dd4855 /src/F2M.php | |
parent | 03c94fad7650f4075ee2d289f8b985cd8f8daef7 (diff) |
Refactored message registration.
git-svn-id: https://vassalengine.svn.sourceforge.net/svnroot/vassalengine/site-src/trunk@6783 67b53d14-2c14-4ace-a08f-0dab2b34000c
Diffstat (limited to 'src/F2M.php')
-rw-r--r-- | src/F2M.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/F2M.php b/src/F2M.php index 74d0725..68d2a12 100644 --- a/src/F2M.php +++ b/src/F2M.php @@ -53,7 +53,6 @@ function send_post_to_lists($config, $user, $mode, $data, $post_data) { } $date = date(DATE_RFC2822, $time); - $messageId = build_message_id($time, $postId, $_SERVER['SERVER_NAME']); $inReplyTo = null; $references = null; @@ -172,13 +171,14 @@ EOF; $body = $msg['body']; } - $mailer = Mail::factory('sendmail'); + $editId = $bridge->reserveEditId($postId); + $messageId = build_message_id($postId, $editId, + $time, $_SERVER['SERVER_NAME']); -# FIXME: Message-id should include the edit_id. To do that, we have to -# register BEFORE creating the Message-id + $mailer = Mail::factory('sendmail'); # Register the message - $seen = !$bridge->registerMessage($postId, $messageId, $inReplyTo); + $seen = !$bridge->registerByEditId($editId, $messageId, $inReplyTo); if ($seen) { throw new Exception('message id already seen: ' . $messageId); } @@ -192,7 +192,7 @@ EOF; } catch (Exception $e) { # Bridging failed, unregister message. - $bridge->unregisterMessage($messageId); + $bridge->unregisterMessage($editId); throw $e; } } |