Skip to content

Commit 8b8b714

Browse files
committed
feature #59377 [Notifier] Add Matrix bridge (chii0815)
This PR was squashed before being merged into the 7.3 branch. Discussion ---------- [Notifier] Add Matrix bridge | Q | A | ------------- | --- | Branch? | 7.3 | Bug fix? | no | New feature? | yes | Deprecations? | no | License | MIT Docs PR: symfony/symfony-docs#20548 Recipe PR: symfony/recipes#1374 Added a new notifier bridge for Matrix Synapse. Whats implemented in this? - sends message to roomID when roomID or userID or roomAlias (see above) is given as recipient - fetches roomID of private room when userID is given as recipient, if no room is available it will be created and the recipiant will be invited to join - fetches roomID when roomAlias is given as recipient Whats not implemented at the moment? - end-to-end encryption, all messages will be unencrypted even if E2E enabled in the room. Commits ------- af8b15d0d7d [Notifier] Add Matrix bridge
2 parents 48d8b3b + 9b8ee64 commit 8b8b714

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

Exception/UnsupportedSchemeException.php

+4
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,10 @@ class UnsupportedSchemeException extends LogicException
148148
'class' => Bridge\Mastodon\MastodonTransportFactory::class,
149149
'package' => 'symfony/mastodon-notifier',
150150
],
151+
'matrix' => [
152+
'class' => Bridge\Matrix\MatrixTransportFactory::class,
153+
'package' => 'symfony/matrix-notifier',
154+
],
151155
'mattermost' => [
152156
'class' => Bridge\Mattermost\MattermostTransportFactory::class,
153157
'package' => 'symfony/mattermost-notifier',

Tests/Exception/UnsupportedSchemeExceptionTest.php

+2
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ public static function setUpBeforeClass(): void
5858
Bridge\Lox24\Lox24TransportFactory::class => false,
5959
Bridge\Mailjet\MailjetTransportFactory::class => false,
6060
Bridge\Mastodon\MastodonTransportFactory::class => false,
61+
Bridge\Matrix\MatrixTransportFactory::class => false,
6162
Bridge\Mattermost\MattermostTransportFactory::class => false,
6263
Bridge\Mercure\MercureTransportFactory::class => false,
6364
Bridge\MessageBird\MessageBirdTransportFactory::class => false,
@@ -155,6 +156,7 @@ public static function messageWhereSchemeIsPartOfSchemeToPackageMapProvider(): \
155156
yield ['lox24', 'symfony/lox24-notifier'];
156157
yield ['mailjet', 'symfony/mailjet-notifier'];
157158
yield ['mastodon', 'symfony/mastodon-notifier'];
159+
yield ['matrix', 'symfony/matrix-notifier'];
158160
yield ['mattermost', 'symfony/mattermost-notifier'];
159161
yield ['mercure', 'symfony/mercure-notifier'];
160162
yield ['messagebird', 'symfony/message-bird-notifier'];

Transport.php

+1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ final class Transport
6060
Bridge\Lox24\Lox24TransportFactory::class,
6161
Bridge\Mailjet\MailjetTransportFactory::class,
6262
Bridge\Mastodon\MastodonTransportFactory::class,
63+
Bridge\Matrix\MatrixTransportFactory::class,
6364
Bridge\Mattermost\MattermostTransportFactory::class,
6465
Bridge\Mercure\MercureTransportFactory::class,
6566
Bridge\MessageBird\MessageBirdTransportFactory::class,

0 commit comments

Comments
 (0)