We can always send via SMTP, receiving mails is via IMAP
This commit is contained in:
parent
ae306ea7de
commit
cb37588375
|
@ -89,15 +89,11 @@ class NodeInfo extends BaseModule
|
||||||
*/
|
*/
|
||||||
private static function getServices(App $app)
|
private static function getServices(App $app)
|
||||||
{
|
{
|
||||||
$config = $app->getConfig();
|
|
||||||
|
|
||||||
$services = [
|
$services = [
|
||||||
'inbound' => [],
|
'inbound' => [],
|
||||||
'outbound' => [],
|
'outbound' => [],
|
||||||
];
|
];
|
||||||
|
|
||||||
$smtp = (function_exists('imap_open') && !$config->get('system', 'imap_disabled') && !$config->get('system', 'dfrn_only'));
|
|
||||||
|
|
||||||
if (Addon::isEnabled('blogger')) {
|
if (Addon::isEnabled('blogger')) {
|
||||||
$services['outbound'][] = 'blogger';
|
$services['outbound'][] = 'blogger';
|
||||||
}
|
}
|
||||||
|
@ -130,9 +126,9 @@ class NodeInfo extends BaseModule
|
||||||
$services['inbound'][] = 'pumpio';
|
$services['inbound'][] = 'pumpio';
|
||||||
$services['outbound'][] = 'pumpio';
|
$services['outbound'][] = 'pumpio';
|
||||||
}
|
}
|
||||||
if ($smtp) {
|
|
||||||
$services['outbound'][] = 'smtp';
|
$services['outbound'][] = 'smtp';
|
||||||
}
|
|
||||||
if (Addon::isEnabled('tumblr')) {
|
if (Addon::isEnabled('tumblr')) {
|
||||||
$services['outbound'][] = 'tumblr';
|
$services['outbound'][] = 'tumblr';
|
||||||
}
|
}
|
||||||
|
@ -218,6 +214,8 @@ class NodeInfo extends BaseModule
|
||||||
{
|
{
|
||||||
$config = $app->getConfig();
|
$config = $app->getConfig();
|
||||||
|
|
||||||
|
$imap = (function_exists('imap_open') && !$config->get('system', 'imap_disabled') && !$config->get('system', 'dfrn_only'));
|
||||||
|
|
||||||
$nodeinfo = [
|
$nodeinfo = [
|
||||||
'version' => '2.0',
|
'version' => '2.0',
|
||||||
'software' => [
|
'software' => [
|
||||||
|
@ -253,6 +251,10 @@ class NodeInfo extends BaseModule
|
||||||
$nodeinfo['services']['inbound'][] = 'rss2.0';
|
$nodeinfo['services']['inbound'][] = 'rss2.0';
|
||||||
$nodeinfo['services']['outbound'][] = 'atom1.0';
|
$nodeinfo['services']['outbound'][] = 'atom1.0';
|
||||||
|
|
||||||
|
if ($imap) {
|
||||||
|
$nodeinfo['services']['inbound'][] = 'imap';
|
||||||
|
}
|
||||||
|
|
||||||
$nodeinfo['metadata']['explicitContent'] = $config->get('system', 'explicit_content', false) == true;
|
$nodeinfo['metadata']['explicitContent'] = $config->get('system', 'explicit_content', false) == true;
|
||||||
|
|
||||||
header('Content-type: application/json; charset=utf-8');
|
header('Content-type: application/json; charset=utf-8');
|
||||||
|
|
Loading…
Reference in New Issue
Block a user