aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-02-26 01:53:18 -0800
committerFriendika <info@friendika.com>2011-02-26 01:53:18 -0800
commit05d3eb59ecdaf757dd2822a65a13b72311307a72 (patch)
treef826302a5838c941a7292bde6f18fdda9c389f14 /mod
parent4efa0f1e813970b3fbd5f95fdc2a7d8ca767ca0e (diff)
downloadvolse-hubzilla-05d3eb59ecdaf757dd2822a65a13b72311307a72.tar.gz
volse-hubzilla-05d3eb59ecdaf757dd2822a65a13b72311307a72.tar.bz2
volse-hubzilla-05d3eb59ecdaf757dd2822a65a13b72311307a72.zip
status.net mentions to non-followers require the numeric profile URL, not the nickname profile URL. Though it works when they are a follower.
Diffstat (limited to 'mod')
-rw-r--r--mod/item.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/mod/item.php b/mod/item.php
index c2487435e..5989d0967 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -239,6 +239,7 @@ function item_post(&$a) {
}
else {
$newname = $name;
+ $alias = '';
if(strstr($name,'_')) {
$newname = str_replace('_',' ',$name);
$r = q("SELECT * FROM `contact` WHERE `name` = '%s' AND `uid` = %d LIMIT 1",
@@ -257,6 +258,8 @@ function item_post(&$a) {
if($r[0]['network'] === 'stat') {
$newname = $r[0]['nick'];
$stat = true;
+ if($r[0]['alias'])
+ $alias = $r[0]['alias'];
}
else
$newname = $r[0]['name'];
@@ -271,6 +274,16 @@ function item_post(&$a) {
if(strlen($str_tags))
$str_tags .= ',';
$str_tags .= '@[url=' . $profile . ']' . $newname . '[/url]';
+
+ // Status.Net seems to require the numeric ID URL in a mention if the person isn't
+ // subscribed to you. But the nickname URL is OK if they are. Grrr. We'll tag both.
+
+ if(strlen($alias)) {
+ if(strlen($str_tags))
+ $str_tags .= ',';
+ $str_tags .= '@[url=' . $alias . ']' . $newname . '[/url]';
+ }
+
}
}
}