mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-06 08:37:30 +02:00
@@ -62,6 +62,9 @@ class MastodonBridge extends BridgeAbstract
|
|||||||
public function collectData()
|
public function collectData()
|
||||||
{
|
{
|
||||||
$user = $this->fetchAP($this->getURI());
|
$user = $this->fetchAP($this->getURI());
|
||||||
|
if (!isset($user['outbox'])) {
|
||||||
|
throw new \Exception('Unable to find the outbox');
|
||||||
|
}
|
||||||
$content = $this->fetchAP($user['outbox']);
|
$content = $this->fetchAP($user['outbox']);
|
||||||
if (is_array($content['first'])) { // mobilizon
|
if (is_array($content['first'])) { // mobilizon
|
||||||
$content = $content['first'];
|
$content = $content['first'];
|
||||||
|
@@ -1,17 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace RssBridge\Tests\Bridges;
|
|
||||||
|
|
||||||
use PHPUnit\Framework\TestCase;
|
|
||||||
|
|
||||||
class MastodonBridgeTest extends TestCase
|
|
||||||
{
|
|
||||||
public function test()
|
|
||||||
{
|
|
||||||
\Configuration::loadConfiguration(['cache' => ['type' => 'null']]);
|
|
||||||
$b = new \MastodonBridge();
|
|
||||||
// https://bird.makeup/users/asmongold/remote_follow
|
|
||||||
$b->setDatas(['canusername' => '@asmongold@bird.makeup']);
|
|
||||||
$b->collectData();
|
|
||||||
}
|
|
||||||
}
|
|
Reference in New Issue
Block a user