Bug 11209: (follow-up) message content must also match for new message to be consider...
authorJonathan Druart <jonathan.druart@biblibre.com>
Fri, 2 May 2014 14:54:51 +0000 (16:54 +0200)
committerGalen Charlton <gmc@esilibrary.com>
Mon, 5 May 2014 15:16:58 +0000 (15:16 +0000)
If the template contains dynamic parts, the message won't be
considerated as duplicated.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Duplicate messages will be queued, but when sending the queued messages
duplicates are found and are marked as failed.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
C4/Letters.pm

index 23b7fdd..055c8c1 100644 (file)
@@ -1035,7 +1035,8 @@ sub _is_duplicate {
         AND letter_code = ?
         AND CAST(time_queued AS date) = CAST(NOW() AS date)
         AND status="sent"
-    |, {}, $message->{message_transport_type}, $message->{borrowernumber}, $message->{letter_code} );
+        AND content = ?
+    |, {}, $message->{message_transport_type}, $message->{borrowernumber}, $message->{letter_code}, $message->{content} );
     return $count;
 }