aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2015-01-13 20:54:27 -0800
committerfriendica <info@friendica.com>2015-01-13 20:54:27 -0800
commit7090b58f68251b8c4b39332f2ea051e95ead3df3 (patch)
tree307bbf7a32888cb133bea127c026ce65668fb9be
parenta93f2b1b8fe55033aa68b80c7c6fb2ef1d1fb7ef (diff)
downloadvolse-hubzilla-7090b58f68251b8c4b39332f2ea051e95ead3df3.tar.gz
volse-hubzilla-7090b58f68251b8c4b39332f2ea051e95ead3df3.tar.bz2
volse-hubzilla-7090b58f68251b8c4b39332f2ea051e95ead3df3.zip
check mentions against the appropriate xchan_url and not a hard-coded /channel/ string
-rwxr-xr-xinclude/items.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/items.php b/include/items.php
index dd9dbc7f9..5812efa90 100755
--- a/include/items.php
+++ b/include/items.php
@@ -2673,7 +2673,7 @@ function tag_deliver($uid,$item_id) {
* Fetch stuff we need - a channel and an item
*/
- $u = q("select * from channel where channel_id = %d limit 1",
+ $u = q("select * from channel left join xchan on channel_hash = xchan_hash where channel_id = %d limit 1",
intval($uid)
);
if(! $u)
@@ -2811,7 +2811,7 @@ function tag_deliver($uid,$item_id) {
if($terms)
logger('tag_deliver: post mentions: ' . print_r($terms,true), LOGGER_DATA);
- $link = normalise_link($a->get_baseurl() . '/channel/' . $u[0]['channel_address']);
+ $link = normalise_link($u[0]['xchan_url']);
if($terms) {
foreach($terms as $term) {
@@ -2952,7 +2952,7 @@ function tgroup_check($uid,$item) {
if(! perm_is_allowed($uid,$item['author_xchan'],'tag_deliver'))
return false;
- $u = q("select * from channel where channel_id = %d limit 1",
+ $u = q("select * from channel left join xchan on channel_hash = xchan_hash where channel_id = %d limit 1",
intval($uid)
);
@@ -2964,7 +2964,7 @@ function tgroup_check($uid,$item) {
if($terms)
logger('tgroup_check: post mentions: ' . print_r($terms,true), LOGGER_DATA);
- $link = normalise_link($a->get_baseurl() . '/channel/' . $u[0]['channel_address']);
+ $link = normalise_link($u[0]['xchan_url']);
if($terms) {
foreach($terms as $term) {