Do proper Activity-plugin based mention notification

This commit is contained in:
Mikael Nordfeldth
2014-07-06 16:37:26 +02:00
parent eda0e25147
commit 2eea7a2d4b
6 changed files with 67 additions and 36 deletions

View File

@@ -191,6 +191,18 @@ class FavoritePlugin extends ActivityHandlerPlugin
}
}
protected function notifyMentioned(Notice $stored, array &$mentioned_ids)
{
require_once INSTALLDIR.'/lib/mail.php';
foreach ($mentioned_ids as $id) {
$mentioned = User::getKV('id', $id);
if ($mentioned instanceof User && $mentioned->id != $stored->profile_id) {
mail_notify_fave($mentioned, $stored->getProfile(), $stored->getParent());
}
}
}
// API stuff
/**