morfeditorial / machinima-telegram-adapter
Telegram platform adapter for the Machinima core app.
Package info
github.com/ChernegaSergiy/machinima-telegram-adapter
Type:symfony-bundle
pkg:composer/morfeditorial/machinima-telegram-adapter
Requires
- php: >=8.4
- lcobucci/jwt: ^4.0
- morfeditorial/machinima-core: dev-main
- morfeditorial/telegram-bot-bundle: dev-main
- symfony/framework-bundle: 8.1.*
- symfony/http-client: 8.1.*
- symfony/notifier: 8.1.*
- symfony/telegram-notifier: 8.1.*
This package is auto-updated.
Last update: 2026-07-14 20:38:23 UTC
README
Telegram platform adapter for the Machinima core app.
Provides the platform-specific implementations of the core
App\Contract\* ports for the Telegram WebApp surface:
App\Contract\PlatformAdapterInterface→Morfeditorial\MachinimaTelegramAdapter\TelegramPlatformAdapter- bootstrap module (
Resources/public/js/telegram-bootstrap.js) — client-side zero-click detection, posted to core's/api/auth/bootstrap - UI-hints module (
Resources/public/js/telegram-ui-hints.js) — theme/back-button, only loaded for an already-authenticated Telegram session
- bootstrap module (
App\Contract\IdentityProviderPort(two, deliberately under different registry names — seeMiniApp\TelegramMiniAppIdentityProviderdocblock):telegram→Oidc\TelegramOidcProvider(OAuth-button login, validates an id_token)telegram_mini_app→MiniApp\TelegramMiniAppIdentityProvider(zero-click, validates raw Mini AppinitData; hidden from/loginviaBootstrapOnlyIdentityProvider)
App\Contract\UserNotificationAddressResolver→Morfeditorial\MachinimaTelegramAdapter\Notification\TelegramNotificationAddressResolverApp\Contract\NotificationChannelPort→Morfeditorial\MachinimaTelegramAdapter\Notification\TelegramNotificationServiceApp\Event\UserAuthenticatedEventbridge fromMorfeditorial\TelegramBotBundle\Event\TelegramUserAuthenticatedEvent→Morfeditorial\MachinimaTelegramAdapter\EventSubscriber\TelegramToIdentityBridge(used by the Telegram bot, i.e. chat commands — unrelated to Mini App zero-click login)
The adapter is loaded by machinima-app only when the active
APP_PROFILE is telegram-webapp or telegram-bot. Core profiles
(core-only) must not import any class from this package.
Env vars
TELEGRAM_BOT_TOKEN— used both bytelegram-bot-bundleand byTelegramMiniAppIdentityProviderto verify Mini AppinitDatasignatures.TELEGRAM_OIDC_CLIENT_ID/TELEGRAM_OIDC_CLIENT_SECRET/TELEGRAM_OIDC_REDIRECT_URI— OAuth-button login only.
Note on telegram_tma firewall authenticator
config/profiles/telegram-webapp/packages/security.yaml in machinima-app
still enables telegram_tma: true, the zero-click firewall authenticator
from telegram-bot-bundle. As of this refactor it is redundant: the client
no longer sends the header that authenticator reads (see
AuthBootstrapController in machinima-app instead). It's left in place
here because touching that bundle's own wiring is outside this package's
source — worth removing once confirmed nothing else depends on it.
Contributing
Contributions are welcome and appreciated! Here's how you can contribute:
- Fork the project
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Please make sure to update tests as appropriate and adhere to the existing coding style.
License
This project is licensed under the CSSM Unlimited License v2.0 (CSSM-ULv2). See the LICENSE file for details.