From c1cf6e48c225725c380472e1f730f6dc02917ecd Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 4 Jan 2012 13:50:12 -0800 Subject: Allow Diaspora to post to forums --- include/items.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'include/items.php') diff --git a/include/items.php b/include/items.php index a63468d92..0bd77582a 100644 --- a/include/items.php +++ b/include/items.php @@ -945,10 +945,15 @@ function tgroup_deliver($uid,$item_id) { $link = normalise_link($a->get_baseurl() . '/profile/' . $u[0]['nickname']); + // Diaspora uses their own hardwired link URL in @-tags + // instead of the one we supply with webfinger + + $dlink = normalise_link($a->get_baseurl() . '/u/' . $u[0]['nickname']); + $cnt = preg_match_all('/[\@\!]\[url\=(.*?)\](.*?)\[\/url\]/ism',$item['body'],$matches,PREG_SET_ORDER); if($cnt) { foreach($matches as $mtch) { - if(link_compare($link,$mtch[1])) { + if(link_compare($link,$mtch[1]) || link_compare($dlink,$mtch[1])) { $deliver_to_tgroup = true; logger('tgroup_deliver: local group mention found: ' . $mtch[2]); } -- cgit v1.2.3