+ $send_notification = count($r);
+
+ if (!$send_notification) {
+ $tags = q("SELECT `url` FROM `term` WHERE `otype` = %d AND `oid` = %d AND `type` = %d AND `uid` = %d",
+ intval(TERM_OBJ_POST), intval($current_post), intval(TERM_MENTION), intval($arr['uid']));
+
+ if (count($tags)) {
+ foreach ($tags AS $tag) {
+ $r = q("SELECT `id` FROM `contact` WHERE `nurl` = '%s' AND `uid` = %d AND `notify_new_posts`",
+ normalise_link($tag["url"]), intval($arr['uid']));
+ if (count($r))
+ $send_notification = true;
+ }
+ }
+ }