aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mod/item.php12
-rw-r--r--version.inc2
2 files changed, 13 insertions, 1 deletions
diff --git a/mod/item.php b/mod/item.php
index 338d2a2ee..3a1e4a95e 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -320,6 +320,18 @@ function item_post(&$a) {
$body = fix_mce_lf($body);
}
+ // If we're sending a private message with a single @-taggable channel as a recipient, @-tag it.
+
+ if(substr_count($str_contact_allow,'<') == 1 && $str_group_allow == '' && str_contact_deny == '' && $str_group_deny == '') {
+ $x = q("select abook_id, abook_their_perms from abook where abook_xchan = '%s' and abook_channel = %d limit 1",
+ dbesc(str_replace(array('<','>'),array('',''),$str_contact_allow)),
+ intval($profile_uid)
+ );
+ if($x && ($x[0]['abook_their_perms'] & PERMS_W_TAGWALL))
+ $body .= "\n\n@group+" . $x[0]['abook_id'] . "\n";
+ }
+
+
/**
* fix naked links by passing through a callback to see if this is a red site
diff --git a/version.inc b/version.inc
index bf1f22e95..3e5e4b481 100644
--- a/version.inc
+++ b/version.inc
@@ -1 +1 @@
-2013-06-26.356
+2013-06-27.357