]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Merge branch 'master' into testing
authorBrion Vibber <brion@pobox.com>
Fri, 23 Apr 2010 21:26:57 +0000 (14:26 -0700)
committerBrion Vibber <brion@pobox.com>
Fri, 23 Apr 2010 21:26:57 +0000 (14:26 -0700)
1  2 
classes/Notice.php

diff --combined classes/Notice.php
index 5c75ec520f7f4ad67a1bf14c7e8619bb0216fbcd,c4a3168881a623486eb9780c3a7800c840dbec87..0b1b2e402dfc05178651f6134f830ab7763af75b
@@@ -701,27 -701,6 +701,27 @@@ class Notice extends Memcached_DataObje
          return $ids;
      }
  
 +    /**
 +     * Is this notice part of an active conversation?
 +     * 
 +     * @return boolean true if other messages exist in the same
 +     *                 conversation, false if this is the only one
 +     */
 +    function hasConversation()
 +    {
 +        if (!empty($this->conversation)) {
 +            $conversation = Notice::conversationStream(
 +                $this->conversation,
 +                1,
 +                1
 +            );
 +            if ($conversation->N > 0) {
 +                return true;
 +            }
 +        }
 +        return false;
 +    }
 +
      /**
       * @param $groups array of Group *objects*
       * @param $recipients array of profile *ids*
                  $reply->profile_id = $user->id;
  
                  $id = $reply->insert();
-                 self::blow('reply:stream:%d', $user->id);
              }
          }
  
                      throw new ServerException("Couldn't save reply for {$this->id}, {$mentioned->id}");
                  } else {
                      $replied[$mentioned->id] = 1;
+                     self::blow('reply:stream:%d', $mentioned->id);
                  }
              }
          }
          foreach ($recipientIds as $recipientId) {
              $user = User::staticGet('id', $recipientId);
              if (!empty($user)) {
-                 self::blow('reply:stream:%d', $recipientId);
                  mail_notify_attn($user, $this);
              }
          }