function sendReplyNotifications()
{
// Don't send reply notifications for repeats
-
if ($this->isRepeat()) {
return array();
}
require_once INSTALLDIR.'/lib/mail.php';
foreach ($recipientIds as $recipientId) {
- $user = User::getKV('id', $recipientId);
- if ($user instanceof User) {
+ try {
+ $user = User::getByID($recipientId);
mail_notify_attn($user, $this);
+ } catch (NoResultException $e) {
+ // No such user
}
}
Event::handle('EndNotifyMentioned', array($this, $recipientIds));
protected function notifyMentioned(Notice $stored, array &$mentioned_ids)
{
// pass through silently by default
+
+ // If we want to stop any other plugin from notifying based on this activity, return false instead.
+ return true;
}
/**
return true;
}
- $this->notifyMentioned($stored, $mentioned_ids);
-
- // If it was _our_ notice, only we should do anything with the mentions.
- return false;
+ return $this->notifyMentioned($stored, $mentioned_ids);
}
/**
* @link http://status.net/
*/
-if (!defined('STATUSNET') && !defined('LACONICA')) {
- exit(1);
-}
+if (!defined('GNUSOCIAL')) { exit(1); }
require_once 'Mail.php';