]> git.mxchange.org Git - friendica.git/commitdiff
Add "discourse" as protocol
authorMichael <heluecht@pirati.ca>
Sun, 24 Nov 2019 20:06:47 +0000 (20:06 +0000)
committerMichael <heluecht@pirati.ca>
Sun, 24 Nov 2019 20:06:47 +0000 (20:06 +0000)
src/Content/ContactSelector.php
src/Content/Widget.php
src/Core/Protocol.php

index 478cfdbbe8da6c5e623d40263cde2b6b2c0bf64f..817602f1eb86ed653d780c17cc193ca3988f9c96 100644 (file)
@@ -125,6 +125,7 @@ class ContactSelector
                        Protocol::GPLUS     =>   L10n::t('Google+'),
                        Protocol::PUMPIO    =>   L10n::t('pump.io'),
                        Protocol::TWITTER   =>   L10n::t('Twitter'),
+                       Protocol::DISCOURSE =>   L10n::t('Discourse'),
                        Protocol::DIASPORA2 =>   L10n::t('Diaspora Connector'),
                        Protocol::STATUSNET =>   L10n::t('GNU Social Connector'),
                        Protocol::ACTIVITYPUB => L10n::t('ActivityPub'),
@@ -185,6 +186,7 @@ class ContactSelector
                        Protocol::GPLUS     =>   'google-plus',
                        Protocol::PUMPIO    =>   'file-text-o', /// @todo
                        Protocol::TWITTER   =>   'twitter',
+                       Protocol::DISCOURSE =>   'dot-circle-o', /// @todo
                        Protocol::DIASPORA2 =>   'diaspora',
                        Protocol::STATUSNET =>   'gnu-social',
                        Protocol::ACTIVITYPUB => 'activitypub',
index 5878bc75d22f7e88a73708d6920215bbb58c647a..b1e925a6621511c1d2605eb34ee81fb4c9ca9c39 100644 (file)
@@ -89,6 +89,10 @@ class Widget
                // Always hide content from these networks
                $networks = ['face', 'apdn'];
 
+               if (!Addon::isEnabled("discourse")) {
+                       $networks[] = Protocol::DISCOURSE;
+               }
+
                if (!Addon::isEnabled("statusnet")) {
                        $networks[] = Protocol::STATUSNET;
                }
index 0ecc076a0fd5501e9b355b175c5b6ca20d30b1b0..4157127a4d9288b89abfaf0e9aa17c7b83b7457f 100644 (file)
@@ -33,6 +33,7 @@ class Protocol
        const PUMPIO    = 'pump';    // pump.io
        const STATUSNET = 'stac';    // Statusnet connector
        const TWITTER   = 'twit';    // Twitter
+       const DISCOURSE = 'dscs';    // Discourse
 
        // Dead protocols
        const APPNET    = 'apdn';    // app.net - Dead protocol