$html = "\n<html xmlns='http://jabber.org/protocol/xhtml-im'>\n";
$html .= "<body xmlns='http://www.w3.org/1999/xhtml'>\n";
- $html .= "<a href='".common_profile_url($profile->nickname)."'>".$profile->nickname."</a>: ";
+ $html .= "<a href='".htmlspecialchars($profile->profileurl)."'>".$profile->nickname."</a>: ";
$html .= ($notice->rendered) ? $notice->rendered : common_render_content($notice->content, $notice);
$html .= "\n</body>\n";
$html .= "\n</html>\n";
$profile->free();
unset($profile);
-
+
$sent_to = array();
$conn = jabber_connect();
}
$user->free();
-
+
# Now, get users subscribed to this profile
$user = new User();
'FROM user JOIN subscription ON user.id = subscription.subscriber ' .
'WHERE subscription.subscribed = ' . $notice->profile_id . ' ' .
'AND user.jabber is not null ' .
- 'AND user.jabbernotify = 1 ');
+ 'AND user.jabbernotify = 1 ' .
+ 'AND subscription.jabber = 1 ');
while ($user->fetch()) {
if (!array_key_exists($user->id, $sent_to)) {
}
$user->free();
-
+
return true;
}