We now set the protocol in "gserver" on receiving as well
This commit is contained in:
parent
5e98a38ac9
commit
9e87dcb25b
6 changed files with 65 additions and 3 deletions
|
@ -25,11 +25,11 @@ use Friendica\Core\Protocol;
|
|||
use Friendica\Database\DBA;
|
||||
use Friendica\DI;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Protocol\Feed;
|
||||
use Friendica\Protocol\OStatus;
|
||||
use Friendica\Util\Strings;
|
||||
use Friendica\Util\Network;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Model\GServer;
|
||||
use Friendica\Model\Post;
|
||||
|
||||
function hub_return($valid, $body)
|
||||
{
|
||||
|
@ -134,6 +134,10 @@ function pubsub_post(App $a)
|
|||
}
|
||||
}
|
||||
|
||||
if (!empty($contact['gsid'])) {
|
||||
GServer::setProtocol($contact['gsid'], Post\DeliveryData::OSTATUS);
|
||||
}
|
||||
|
||||
if (!in_array($contact['rel'], [Contact::SHARING, Contact::FRIEND]) && ($contact['network'] != Protocol::FEED)) {
|
||||
Logger::log('Contact ' . $contact['id'] . ' is not expected to share with us - ignored.');
|
||||
hub_post_return();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue