]> git.mxchange.org Git - friendica.git/commitdiff
We can always send via SMTP, receiving mails is via IMAP
authorMichael <heluecht@pirati.ca>
Wed, 27 Nov 2019 07:44:59 +0000 (07:44 +0000)
committerMichael <heluecht@pirati.ca>
Wed, 27 Nov 2019 07:44:59 +0000 (07:44 +0000)
src/Module/NodeInfo.php

index 999b3fb8f29e34aa68ef9bdd68fc8baeed8dd23e..a4bc9be2b4205bacef7742131e144716d567a41f 100644 (file)
@@ -89,15 +89,11 @@ class NodeInfo extends BaseModule
        */
        private static function getServices(App $app)
        {
-               $config = $app->getConfig();
-
                $services = [
                        'inbound'  => [],
                        'outbound' => [],
                ];
 
-               $smtp = (function_exists('imap_open') && !$config->get('system', 'imap_disabled') && !$config->get('system', 'dfrn_only'));
-
                if (Addon::isEnabled('blogger')) {
                        $services['outbound'][] = 'blogger';
                }
@@ -130,9 +126,9 @@ class NodeInfo extends BaseModule
                        $services['inbound'][] = 'pumpio';
                        $services['outbound'][] = 'pumpio';
                }
-               if ($smtp) {
-                       $services['outbound'][] = 'smtp';
-               }
+
+               $services['outbound'][] = 'smtp';
+
                if (Addon::isEnabled('tumblr')) {
                        $services['outbound'][] = 'tumblr';
                }
@@ -218,6 +214,8 @@ class NodeInfo extends BaseModule
        {
                $config = $app->getConfig();
 
+               $imap = (function_exists('imap_open') && !$config->get('system', 'imap_disabled') && !$config->get('system', 'dfrn_only'));
+
                $nodeinfo = [
                        'version'           => '2.0',
                        'software'          => [
@@ -253,6 +251,10 @@ class NodeInfo extends BaseModule
                $nodeinfo['services']['inbound'][]  = 'rss2.0';
                $nodeinfo['services']['outbound'][] = 'atom1.0';
 
+               if ($imap) {
+                       $nodeinfo['services']['inbound'][] = 'imap';
+               }
+
                $nodeinfo['metadata']['explicitContent'] = $config->get('system', 'explicit_content', false) == true;
 
                header('Content-type: application/json; charset=utf-8');