Merge pull request #7865 from annando/add-discourse

Add "discourse" as protocol
This commit is contained in:
Hypolite Petovan 2019-11-24 18:54:14 -05:00 committed by GitHub
commit 4d95e9c3ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 0 deletions

View File

@ -125,6 +125,7 @@ class ContactSelector
Protocol::GPLUS => L10n::t('Google+'), Protocol::GPLUS => L10n::t('Google+'),
Protocol::PUMPIO => L10n::t('pump.io'), Protocol::PUMPIO => L10n::t('pump.io'),
Protocol::TWITTER => L10n::t('Twitter'), Protocol::TWITTER => L10n::t('Twitter'),
Protocol::DISCOURSE => L10n::t('Discourse'),
Protocol::DIASPORA2 => L10n::t('Diaspora Connector'), Protocol::DIASPORA2 => L10n::t('Diaspora Connector'),
Protocol::STATUSNET => L10n::t('GNU Social Connector'), Protocol::STATUSNET => L10n::t('GNU Social Connector'),
Protocol::ACTIVITYPUB => L10n::t('ActivityPub'), Protocol::ACTIVITYPUB => L10n::t('ActivityPub'),
@ -185,6 +186,7 @@ class ContactSelector
Protocol::GPLUS => 'google-plus', Protocol::GPLUS => 'google-plus',
Protocol::PUMPIO => 'file-text-o', /// @todo Protocol::PUMPIO => 'file-text-o', /// @todo
Protocol::TWITTER => 'twitter', Protocol::TWITTER => 'twitter',
Protocol::DISCOURSE => 'dot-circle-o', /// @todo
Protocol::DIASPORA2 => 'diaspora', Protocol::DIASPORA2 => 'diaspora',
Protocol::STATUSNET => 'gnu-social', Protocol::STATUSNET => 'gnu-social',
Protocol::ACTIVITYPUB => 'activitypub', Protocol::ACTIVITYPUB => 'activitypub',

View File

@ -89,6 +89,10 @@ class Widget
// Always hide content from these networks // Always hide content from these networks
$networks = ['face', 'apdn']; $networks = ['face', 'apdn'];
if (!Addon::isEnabled("discourse")) {
$networks[] = Protocol::DISCOURSE;
}
if (!Addon::isEnabled("statusnet")) { if (!Addon::isEnabled("statusnet")) {
$networks[] = Protocol::STATUSNET; $networks[] = Protocol::STATUSNET;
} }

View File

@ -33,6 +33,7 @@ class Protocol
const PUMPIO = 'pump'; // pump.io const PUMPIO = 'pump'; // pump.io
const STATUSNET = 'stac'; // Statusnet connector const STATUSNET = 'stac'; // Statusnet connector
const TWITTER = 'twit'; // Twitter const TWITTER = 'twit'; // Twitter
const DISCOURSE = 'dscs'; // Discourse
// Dead protocols // Dead protocols
const APPNET = 'apdn'; // app.net - Dead protocol const APPNET = 'apdn'; // app.net - Dead protocol