forked from GNUsocial/gnu-social
Merge branch 'testing' of git@gitorious.org:statusnet/mainline into testing
This commit is contained in:
commit
0c7844734e
@ -221,9 +221,17 @@ class OStatusPlugin extends Plugin
|
|||||||
|
|
||||||
$webfinger = $wmatch[0];
|
$webfinger = $wmatch[0];
|
||||||
|
|
||||||
|
$this->log(LOG_INFO, "Checking Webfinger for address '$webfinger'");
|
||||||
|
|
||||||
$oprofile = Ostatus_profile::ensureWebfinger($webfinger);
|
$oprofile = Ostatus_profile::ensureWebfinger($webfinger);
|
||||||
|
|
||||||
if (!empty($oprofile)) {
|
if (empty($oprofile)) {
|
||||||
|
|
||||||
|
$this->log(LOG_INFO, "No Ostatus_profile found for address '$webfinger'");
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
$this->log(LOG_INFO, "Ostatus_profile found for address '$webfinger'");
|
||||||
|
|
||||||
$profile = $oprofile->localProfile();
|
$profile = $oprofile->localProfile();
|
||||||
|
|
||||||
|
@ -299,19 +299,10 @@ class Ostatus_profile extends Memcached_DataObject
|
|||||||
throw new ServerException("Remote groups can't subscribe to local users");
|
throw new ServerException("Remote groups can't subscribe to local users");
|
||||||
}
|
}
|
||||||
|
|
||||||
// @fixme use regular channels for subbing, once they accept remote profiles
|
Subscription::start($this->localProfile(), $user->getProfile());
|
||||||
$sub = new Subscription();
|
|
||||||
$sub->subscriber = $this->profile_id;
|
|
||||||
$sub->subscribed = $user->id;
|
|
||||||
$sub->created = common_sql_now(); // current time
|
|
||||||
|
|
||||||
if ($sub->insert()) {
|
|
||||||
// @fixme use subs_notify() if refactored to take profiles?
|
|
||||||
mail_subscribe_notify_profile($user, $this->localProfile());
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Send a subscription request to the hub for this feed.
|
* Send a subscription request to the hub for this feed.
|
||||||
@ -1163,7 +1154,6 @@ class Ostatus_profile extends Memcached_DataObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
protected static function getActivityObjectNickname($object, $hints=array())
|
protected static function getActivityObjectNickname($object, $hints=array())
|
||||||
{
|
{
|
||||||
if ($object->poco) {
|
if ($object->poco) {
|
||||||
|
Loading…
Reference in New Issue
Block a user