docs(messaging): keep only the comments that answer a question the code raises

This commit is contained in:
Chirag Aggarwal committed 2026-09-18 14:08:57 +01:00
1 parent c7065a4136
commit b8f1730f20
2 files changed
+8 -16

No files matched your search

+2 -7
View File
@@ -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 {
+6 -9
View File
@@ -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
{