定制 morfeditorial/machinima-telegram-adapter 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

morfeditorial/machinima-telegram-adapter

Composer 安装命令:

composer require morfeditorial/machinima-telegram-adapter

包简介

Telegram platform adapter for the Machinima core app.

README 文档

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\PlatformAdapterInterfaceMorfeditorial\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
  • App\Contract\IdentityProviderPort (two, deliberately under different registry names — see MiniApp\TelegramMiniAppIdentityProvider docblock):
    • telegramOidc\TelegramOidcProvider (OAuth-button login, validates an id_token)
    • telegram_mini_appMiniApp\TelegramMiniAppIdentityProvider (zero-click, validates raw Mini App initData; hidden from /login via BootstrapOnlyIdentityProvider)
  • App\Contract\UserNotificationAddressResolverMorfeditorial\MachinimaTelegramAdapter\Notification\TelegramNotificationAddressResolver
  • App\Contract\NotificationChannelPortMorfeditorial\MachinimaTelegramAdapter\Notification\TelegramNotificationService
  • App\Event\UserAuthenticatedEvent bridge from Morfeditorial\TelegramBotBundle\Event\TelegramUserAuthenticatedEventMorfeditorial\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 by telegram-bot-bundle and by TelegramMiniAppIdentityProvider to verify Mini App initData signatures.
  • 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:

  1. Fork the project
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. 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.

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: LicenseRef-CSSM-Unlimited-2.0
  • 更新时间: 2026-07-14

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固