Merge pull request #13335 from annando/no-twitter
The twitter addon is no import connector anymore
This commit is contained in:
commit
3cda8b65cd
8 changed files with 9 additions and 31 deletions
|
@ -266,6 +266,7 @@ function item_process(array $post, array $request, bool $preview, string $return
|
||||||
$post['uri-id'] = -1;
|
$post['uri-id'] = -1;
|
||||||
$post['author-network'] = Protocol::DFRN;
|
$post['author-network'] = Protocol::DFRN;
|
||||||
$post['author-updated'] = '';
|
$post['author-updated'] = '';
|
||||||
|
$post['author-alias'] = '';
|
||||||
$post['author-gsid'] = 0;
|
$post['author-gsid'] = 0;
|
||||||
$post['author-uri-id'] = ItemURI::getIdByURI($post['author-link']);
|
$post['author-uri-id'] = ItemURI::getIdByURI($post['author-link']);
|
||||||
$post['owner-updated'] = '';
|
$post['owner-updated'] = '';
|
||||||
|
|
|
@ -220,7 +220,8 @@ class ContactSelector
|
||||||
'GNU Social' => 'gnu-social', 'gnusocial' => 'gnu-social', 'hubzilla' => 'hubzilla',
|
'GNU Social' => 'gnu-social', 'gnusocial' => 'gnu-social', 'hubzilla' => 'hubzilla',
|
||||||
'mastodon' => 'mastodon', 'peertube' => 'peertube', 'pixelfed' => 'pixelfed',
|
'mastodon' => 'mastodon', 'peertube' => 'peertube', 'pixelfed' => 'pixelfed',
|
||||||
'pleroma' => 'pleroma', 'red' => 'hubzilla', 'redmatrix' => 'hubzilla',
|
'pleroma' => 'pleroma', 'red' => 'hubzilla', 'redmatrix' => 'hubzilla',
|
||||||
'socialhome' => 'social-home', 'wordpress' => 'wordpress', 'lemmy' => 'users'];
|
'socialhome' => 'social-home', 'wordpress' => 'wordpress', 'lemmy' => 'users',
|
||||||
|
'firefish' => 'fire', 'calckey' => 'calculator', 'kbin' => 'check'];
|
||||||
|
|
||||||
$search = array_keys($nets);
|
$search = array_keys($nets);
|
||||||
$replace = array_values($nets);
|
$replace = array_values($nets);
|
||||||
|
|
|
@ -102,7 +102,7 @@ class Widget
|
||||||
public static function unavailableNetworks(): array
|
public static function unavailableNetworks(): array
|
||||||
{
|
{
|
||||||
// Always hide content from these networks
|
// Always hide content from these networks
|
||||||
$networks = [Protocol::PHANTOM, Protocol::FACEBOOK, Protocol::APPNET, Protocol::ZOT];
|
$networks = [Protocol::PHANTOM, Protocol::FACEBOOK, Protocol::APPNET, Protocol::TWITTER, Protocol::ZOT];
|
||||||
|
|
||||||
if (!Addon::isEnabled("discourse")) {
|
if (!Addon::isEnabled("discourse")) {
|
||||||
$networks[] = Protocol::DISCOURSE;
|
$networks[] = Protocol::DISCOURSE;
|
||||||
|
@ -116,10 +116,6 @@ class Widget
|
||||||
$networks[] = Protocol::PUMPIO;
|
$networks[] = Protocol::PUMPIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Addon::isEnabled("twitter")) {
|
|
||||||
$networks[] = Protocol::TWITTER;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!Addon::isEnabled("tumblr")) {
|
if (!Addon::isEnabled("tumblr")) {
|
||||||
$networks[] = Protocol::TUMBLR;
|
$networks[] = Protocol::TUMBLR;
|
||||||
}
|
}
|
||||||
|
|
|
@ -109,8 +109,9 @@ class Nodeinfo
|
||||||
'outbound' => [],
|
'outbound' => [],
|
||||||
];
|
];
|
||||||
|
|
||||||
if (Addon::isEnabled('blogger')) {
|
if (Addon::isEnabled('bluesky')) {
|
||||||
$services['outbound'][] = 'blogger';
|
$services['inbound'][] = 'bluesky';
|
||||||
|
$services['outbound'][] = 'bluesky';
|
||||||
}
|
}
|
||||||
if (Addon::isEnabled('dwpost')) {
|
if (Addon::isEnabled('dwpost')) {
|
||||||
$services['outbound'][] = 'dreamwidth';
|
$services['outbound'][] = 'dreamwidth';
|
||||||
|
@ -125,18 +126,9 @@ class Nodeinfo
|
||||||
if (Addon::isEnabled('libertree')) {
|
if (Addon::isEnabled('libertree')) {
|
||||||
$services['outbound'][] = 'libertree';
|
$services['outbound'][] = 'libertree';
|
||||||
}
|
}
|
||||||
if (Addon::isEnabled('buffer')) {
|
|
||||||
$services['outbound'][] = 'linkedin';
|
|
||||||
}
|
|
||||||
if (Addon::isEnabled('ljpost')) {
|
if (Addon::isEnabled('ljpost')) {
|
||||||
$services['outbound'][] = 'livejournal';
|
$services['outbound'][] = 'livejournal';
|
||||||
}
|
}
|
||||||
if (Addon::isEnabled('buffer')) {
|
|
||||||
$services['outbound'][] = 'pinterest';
|
|
||||||
}
|
|
||||||
if (Addon::isEnabled('posterous')) {
|
|
||||||
$services['outbound'][] = 'posterous';
|
|
||||||
}
|
|
||||||
if (Addon::isEnabled('pumpio')) {
|
if (Addon::isEnabled('pumpio')) {
|
||||||
$services['inbound'][] = 'pumpio';
|
$services['inbound'][] = 'pumpio';
|
||||||
$services['outbound'][] = 'pumpio';
|
$services['outbound'][] = 'pumpio';
|
||||||
|
@ -147,7 +139,7 @@ class Nodeinfo
|
||||||
if (Addon::isEnabled('tumblr')) {
|
if (Addon::isEnabled('tumblr')) {
|
||||||
$services['outbound'][] = 'tumblr';
|
$services['outbound'][] = 'tumblr';
|
||||||
}
|
}
|
||||||
if (Addon::isEnabled('twitter') || Addon::isEnabled('buffer')) {
|
if (Addon::isEnabled('twitter')) {
|
||||||
$services['outbound'][] = 'twitter';
|
$services['outbound'][] = 'twitter';
|
||||||
}
|
}
|
||||||
if (Addon::isEnabled('wppost')) {
|
if (Addon::isEnabled('wppost')) {
|
||||||
|
|
|
@ -88,10 +88,6 @@ class NodeInfo110 extends BaseModule
|
||||||
|
|
||||||
$nodeinfo['metadata']['services'] = $nodeinfo['services'];
|
$nodeinfo['metadata']['services'] = $nodeinfo['services'];
|
||||||
|
|
||||||
if (Addon::isEnabled('twitter')) {
|
|
||||||
$nodeinfo['metadata']['services']['inbound'][] = 'twitter';
|
|
||||||
}
|
|
||||||
|
|
||||||
$nodeinfo['metadata']['explicitContent'] = $this->config->get('system', 'explicit_content', false) == true;
|
$nodeinfo['metadata']['explicitContent'] = $this->config->get('system', 'explicit_content', false) == true;
|
||||||
|
|
||||||
$this->response->setType(ICanCreateResponses::TYPE_JSON);
|
$this->response->setType(ICanCreateResponses::TYPE_JSON);
|
||||||
|
|
|
@ -72,10 +72,6 @@ class NodeInfo120 extends BaseModule
|
||||||
$nodeinfo['protocols'][] = 'ostatus';
|
$nodeinfo['protocols'][] = 'ostatus';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Addon::isEnabled('twitter')) {
|
|
||||||
$nodeinfo['services']['inbound'][] = 'twitter';
|
|
||||||
}
|
|
||||||
|
|
||||||
$nodeinfo['services']['inbound'][] = 'atom1.0';
|
$nodeinfo['services']['inbound'][] = 'atom1.0';
|
||||||
$nodeinfo['services']['inbound'][] = 'rss2.0';
|
$nodeinfo['services']['inbound'][] = 'rss2.0';
|
||||||
$nodeinfo['services']['outbound'][] = 'atom1.0';
|
$nodeinfo['services']['outbound'][] = 'atom1.0';
|
||||||
|
|
|
@ -71,10 +71,6 @@ class NodeInfo210 extends BaseModule
|
||||||
$nodeinfo['protocols'][] = 'ostatus';
|
$nodeinfo['protocols'][] = 'ostatus';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Addon::isEnabled('twitter')) {
|
|
||||||
$nodeinfo['services']['inbound'][] = 'twitter';
|
|
||||||
}
|
|
||||||
|
|
||||||
$nodeinfo['services']['inbound'][] = 'atom1.0';
|
$nodeinfo['services']['inbound'][] = 'atom1.0';
|
||||||
$nodeinfo['services']['inbound'][] = 'rss2.0';
|
$nodeinfo['services']['inbound'][] = 'rss2.0';
|
||||||
$nodeinfo['services']['outbound'][] = 'atom1.0';
|
$nodeinfo['services']['outbound'][] = 'atom1.0';
|
||||||
|
|
|
@ -59,7 +59,7 @@ class Statistics extends BaseModule
|
||||||
/// @todo mark the "service" addons and load them dynamically here
|
/// @todo mark the "service" addons and load them dynamically here
|
||||||
$services = [
|
$services = [
|
||||||
'appnet' => Addon::isEnabled('appnet'),
|
'appnet' => Addon::isEnabled('appnet'),
|
||||||
'buffer' => Addon::isEnabled('buffer'),
|
'bluesky' => Addon::isEnabled('bluesky'),
|
||||||
'dreamwidth' => Addon::isEnabled('dreamwidth'),
|
'dreamwidth' => Addon::isEnabled('dreamwidth'),
|
||||||
'gnusocial' => Addon::isEnabled('gnusocial'),
|
'gnusocial' => Addon::isEnabled('gnusocial'),
|
||||||
'libertree' => Addon::isEnabled('libertree'),
|
'libertree' => Addon::isEnabled('libertree'),
|
||||||
|
|
Loading…
Reference in a new issue