use of net.jforum.util.mail.TopicReplySpammer in project jforum2 by rafaelsteil.
the class TopicsCommon method notifyUsers.
/**
* Sends a "new post" notification message to all users watching the topic.
*
* @param t The changed topic
* @param p The new message
*/
public static void notifyUsers(Topic t, Post p) {
if (SystemGlobals.getBoolValue(ConfigKeys.MAIL_NOTIFY_ANSWERS)) {
TopicDAO dao = DataAccessDriver.getInstance().newTopicDAO();
List usersToNotify = dao.notifyUsers(t);
// subscribed to the topic
if (usersToNotify != null && usersToNotify.size() > 0) {
Executor.execute(new EmailSenderTask(new TopicReplySpammer(t, p, usersToNotify)));
}
}
}
Aggregations