Count inbound and outbound packets

This commit is contained in:
Michael 2024-07-23 11:38:04 +00:00
parent ca5f93a4d5
commit e011b5956a
13 changed files with 63 additions and 0 deletions

View file

@ -28,6 +28,7 @@ use Friendica\Core\System;
use Friendica\Database\Database;
use Friendica\Model\Contact;
use Friendica\Model\GServer;
use Friendica\Model\Item;
use Friendica\Model\Post;
use Friendica\Module\Response;
use Friendica\Network\HTTPException;
@ -101,6 +102,7 @@ class PubSub extends \Friendica\BaseModule
$this->logger->info('Import item from Contact.', ['nickname' => $nickname, 'contact-nickname' => $contact['nick'], 'contact-id' => $contact['id']]);
$feedhub = '';
Item::incrementOutbound(Protocol::OSTATUS);
OStatus::import($xml, $importer, $contact, $feedhub);
throw new HTTPException\OKException();

View file

@ -26,6 +26,7 @@ use Friendica\Core\L10n;
use Friendica\Core\Protocol;
use Friendica\Database\Database;
use Friendica\Model\GServer;
use Friendica\Model\Item;
use Friendica\Model\Post;
use Friendica\Module\Response;
use Friendica\Protocol\ActivityNamespace;
@ -210,6 +211,7 @@ class Salmon extends \Friendica\BaseModule
$contact = $contact ?: [];
Item::incrementOutbound(Protocol::OSTATUS);
OStatus::import($data, $importer, $contact, $hub);
throw new HTTPException\OKException();