diff options
author | friendica <info@friendica.com> | 2014-09-09 22:33:23 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2014-09-09 22:33:23 -0700 |
commit | e7b005b1f86b276476aaade7b5b20ff04e5ec72e (patch) | |
tree | e2144d2d78fed6e82fe72ab7e7c6513203b11389 /include/bb2diaspora.php | |
parent | c1713d49e0f9f578ae7c28edc27697864058cc83 (diff) | |
download | volse-hubzilla-e7b005b1f86b276476aaade7b5b20ff04e5ec72e.tar.gz volse-hubzilla-e7b005b1f86b276476aaade7b5b20ff04e5ec72e.tar.bz2 volse-hubzilla-e7b005b1f86b276476aaade7b5b20ff04e5ec72e.zip |
go through the entire discovery sequence for mentions to make sure we have the correct URL
Diffstat (limited to 'include/bb2diaspora.php')
-rw-r--r-- | include/bb2diaspora.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/include/bb2diaspora.php b/include/bb2diaspora.php index 0f91c8bc8..c499a046a 100644 --- a/include/bb2diaspora.php +++ b/include/bb2diaspora.php @@ -85,13 +85,21 @@ function diaspora_mention_callback($matches) { $r = q("select * from hubloc left join xchan on hubloc_hash = xchan_hash where hubloc_addr = '%s' limit 1", dbesc($webbie) ); + if(! $r) { + $x = discover_by_webbie($webbie); + if($x) { + $r = q("select * from hubloc left join xchan on hubloc_hash = xchan_hash where hubloc_addr = '%s' limit 1", + dbesc($webbie) + ); + } + } if($r) $link = $r[0]['xchan_url']; } if(! $link) $link = 'https://' . $matches[3] . '/u/' . $matches[2]; - return '@[url=' . $link . ']' . trim($matches[1]) . ((substr($mentions[0],-1,1) === '+') ? '+' : '') . '[/url]' ; + return '@[url=' . $link . ']' . trim($matches[1]) . ((substr($matches[0],-1,1) === '+') ? '+' : '') . '[/url]' ; } |