Merge branch 'testing' of git@gitorious.org:statusnet/mainline into testing
This commit is contained in:
commit
75cf4d4312
|
@ -210,7 +210,7 @@ class OStatusPlugin extends Plugin
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function onStartFindMentions($sender, $text, &$mentions)
|
function onEndFindMentions($sender, $text, &$mentions)
|
||||||
{
|
{
|
||||||
preg_match_all('/(?:^|\s+)@((?:\w+\.)*\w+@(?:\w+\.)*\w+(?:\w+\-\w+)*\.\w+)/',
|
preg_match_all('/(?:^|\s+)@((?:\w+\.)*\w+@(?:\w+\.)*\w+(?:\w+\-\w+)*\.\w+)/',
|
||||||
$text,
|
$text,
|
||||||
|
@ -233,11 +233,21 @@ class OStatusPlugin extends Plugin
|
||||||
|
|
||||||
$this->log(LOG_INFO, "Ostatus_profile found for address '$webfinger'");
|
$this->log(LOG_INFO, "Ostatus_profile found for address '$webfinger'");
|
||||||
|
|
||||||
|
if ($oprofile->isGroup()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
$profile = $oprofile->localProfile();
|
$profile = $oprofile->localProfile();
|
||||||
|
|
||||||
|
$pos = $wmatch[1];
|
||||||
|
foreach ($mentions as $i => $other) {
|
||||||
|
// If we share a common prefix with a local user, override it!
|
||||||
|
if ($other['position'] == $pos) {
|
||||||
|
unset($mentions[$i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
$mentions[] = array('mentioned' => array($profile),
|
$mentions[] = array('mentioned' => array($profile),
|
||||||
'text' => $wmatch[0],
|
'text' => $wmatch[0],
|
||||||
'position' => $wmatch[1],
|
'position' => $pos,
|
||||||
'url' => $profile->profileurl);
|
'url' => $profile->profileurl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,7 +40,11 @@ class PushInQueueHandler extends QueueHandler
|
||||||
|
|
||||||
$feedsub = FeedSub::staticGet('id', $feedsub_id);
|
$feedsub = FeedSub::staticGet('id', $feedsub_id);
|
||||||
if ($feedsub) {
|
if ($feedsub) {
|
||||||
$feedsub->receive($post, $hmac);
|
try {
|
||||||
|
$feedsub->receive($post, $hmac);
|
||||||
|
} catch(Exception $e) {
|
||||||
|
common_log(LOG_ERR, "Exception during PuSH input processing for $feedsub->uri: " . $e->getMessage());
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
common_log(LOG_ERR, "Discarding POST to unknown feed subscription id $feedsub_id");
|
common_log(LOG_ERR, "Discarding POST to unknown feed subscription id $feedsub_id");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user