From b8f1730f2033037e31397fc8fd348cb9f7518945 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Fri, 18 Sep 2026 14:08:57 +0100 Subject: [PATCH] docs(messaging): keep only the comments that answer a question the code raises --- app/init/resources.php | 9 ++------- src/Appwrite/Messaging/Provider.php | 15 ++++++--------- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/app/init/resources.php b/app/init/resources.php index 758b77ea59..532892dde1 100644 --- a/app/init/resources.php +++ b/app/init/resources.php @@ -120,13 +120,8 @@ $container->set('autogravity', function (Cache $cache) { $container->set('telemetry', fn () => new NoTelemetry(), []); /** - * The platform's own SMS adapter, built from _APP_SMS_PROVIDER for the one-time passcodes - * and invites Appwrite sends on a project's behalf. Null when the variable is unset, which - * is how an instance says it cannot deliver over SMS. - * - * A malformed DSN is reported and read as unset rather than thrown, because this is injected - * into every messaging job: letting one bad platform variable escape would stop a project's - * push and email messages, which it has nothing to do with. + * A malformed DSN is reported and read as unset rather than thrown: this resolves for every + * messaging job, so one bad platform variable must not stop a project's push and email. */ $container->set('adapterForSMS', function (Telemetry $telemetry): ?SMSAdapter { try { diff --git a/src/Appwrite/Messaging/Provider.php b/src/Appwrite/Messaging/Provider.php index 67fd2ad780..878f43020a 100644 --- a/src/Appwrite/Messaging/Provider.php +++ b/src/Appwrite/Messaging/Provider.php @@ -28,17 +28,14 @@ use Utopia\System\System; use Utopia\Telemetry\Adapter as Telemetry; /** - * Builds the sending adapter a messaging provider needs. + * Builds the adapter a messaging provider sends through. * - * A provider is either one a project configured and stored as a document, or the - * platform's own, described by the _APP_SMS_PROVIDER environment variable and used - * for the one-time passcodes and invites Appwrite sends on a project's behalf. Both - * end up as the same adapter, so the DSN is turned into a provider document and - * takes the same path. + * A provider is either one a project stored as a document or the platform's own, described + * by _APP_SMS_PROVIDER. Both reach the same adapter, so the DSN becomes a provider document + * and takes the same path. * - * Push is missing on purpose. Its Appwrite provider is built from the message being - * sent and the project database it belongs to, so it cannot be described by a - * provider document alone and stays with the worker that has those to hand. + * Push is absent on purpose: its Appwrite provider needs the message and the project + * database, so a provider document alone does not describe it. */ class Provider {