From 86b9f7d7a1bc4cfbf36920fbfa78c9f9389f5b51 Mon Sep 17 00:00:00 2001 From: Hugo Sales Date: Wed, 5 Aug 2020 20:47:28 +0000 Subject: [PATCH] [COMPONENT][PLUGIN] Move Email and XMPP notification handlers from components to plugins, so they can be disabled --- .../EmailNotifications/EmailNotifications.php | 6 +++--- .../XMPPNotifications/XMPPNotifications.php | 15 +++++++++++++-- 2 files changed, 16 insertions(+), 5 deletions(-) rename components/Email/Email.php => plugins/EmailNotifications/EmailNotifications.php (93%) rename components/XMPP/XMPP.php => plugins/XMPPNotifications/XMPPNotifications.php (73%) diff --git a/components/Email/Email.php b/plugins/EmailNotifications/EmailNotifications.php similarity index 93% rename from components/Email/Email.php rename to plugins/EmailNotifications/EmailNotifications.php index 843d1331d9..bd41b37dc1 100644 --- a/components/Email/Email.php +++ b/plugins/EmailNotifications/EmailNotifications.php @@ -23,19 +23,19 @@ * Handle email notifications * * @package GNUsocial - * @category Component + * @category Plugin * * @author Hugo Sales * @copyright 2020 Free Software Foundation, Inc http://www.fsf.org * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later */ -namespace Component\Email; +namespace Plugin\EmailNotifications; use App\Core\Event; use App\Core\Module; -class Email extends Module +class EmailNotifications extends Module { public function onAddNotificationTransport(&$form_defs): bool { diff --git a/components/XMPP/XMPP.php b/plugins/XMPPNotifications/XMPPNotifications.php similarity index 73% rename from components/XMPP/XMPP.php rename to plugins/XMPPNotifications/XMPPNotifications.php index aac91684b7..6ec8dd7adc 100644 --- a/components/XMPP/XMPP.php +++ b/plugins/XMPPNotifications/XMPPNotifications.php @@ -19,12 +19,23 @@ // }}} -namespace Component\XMPP; +/** + * Handle xmpp notifications + * + * @package GNUsocial + * @category Plugin + * + * @author Hugo Sales + * @copyright 2020 Free Software Foundation, Inc http://www.fsf.org + * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later + */ + +namespace Plugin\XMPPNotifications; use App\Core\Event; use App\Core\Module; -class XMPP extends Module +class XMPPNotifications extends Module { public function onAddNotificationTransport(&$form_defs): bool {