Index: privatemsg.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/privatemsg/privatemsg.install,v
retrieving revision 1.5.2.4.2.11.2.11.2.9
diff -u -p -r1.5.2.4.2.11.2.11.2.9 privatemsg.install
--- privatemsg.install	12 Jul 2010 08:08:45 -0000	1.5.2.4.2.11.2.11.2.9
+++ privatemsg.install	24 Jul 2010 20:58:50 -0000
@@ -51,8 +51,8 @@ function privatemsg_schema() {
         'not null' => TRUE,
         'default' => 'user'
       ),
-
     ),
+    'primary key'     => array('mid', 'recipient', 'type'),
     'indexes'         => array(
       'mid'               => array('mid'),
       'thread_id'         => array('thread_id'),
Index: privatemsg.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/privatemsg/privatemsg.module,v
retrieving revision 1.70.2.30.2.91.2.64.2.79
diff -u -p -r1.70.2.30.2.91.2.64.2.79 privatemsg.module
--- privatemsg.module	24 Jul 2010 19:53:30 -0000	1.70.2.30.2.91.2.64.2.79
+++ privatemsg.module	24 Jul 2010 20:58:52 -0000
@@ -1698,19 +1698,18 @@ function _privatemsg_send($message) {
       ));
     }
 
-    // When author is also the recipient, we want to set message to UNREAD.
-    // All other times the message is set to READ.
-    $is_new = isset($message->recipients['user_' . $message->author->uid]) ? 1 : 0;
-
-    // Also add a record for the author to the pm_index table.
-    $query->values(array(
-      'mid' => $mid,
-      'thread_id' => $message->thread_id,
-      'recipient' => $message->author->uid,
-      'type' => 'user',
-      'is_new' => $is_new,
-      'deleted' => 0,
-    ));
+    // We only want to add the author to the pm_index table, if the message has
+    // not been sent directly to him.
+    if ($message->recipients['user_' . $message->author->uid]) {
+      $query->values(array(
+        'mid' => $mid,
+        'thread_id' => $message->thread_id,
+        'recipient' => $message->author->uid,
+        'type' => 'user',
+        'is_new' => 1,
+        'deleted' => 0,
+      ));
+    }
     $query->execute();
 
     module_invoke_all('privatemsg_message_insert', $message);
