feat: Telegram Bot Integration
- TelegramService: Non-Streaming Claude Chat mit Tool-Loop, Commands (/start, /link, /session, /new, /clear, /status, /unlink), Nachrichten-Splitting bei >4096 Zeichen, Typing-Indicator, History-Aufbau aus DB, Token-Usage-Tracking - TelegramEndpoint: Webhook (POST, no-auth), Link-Code-Generierung (POST, auth), Webhook-Registrierung + Info (Admin) - DatabaseService: telegram_links Tabelle mit Link-Code-Flow (6-stelliger Code, 5 Min Ablauf), GetUserSessions - AuthMiddleware: /api/telegram/webhook von Auth ausgenommen - Session-Verknüpfung via Link-Code (Web-UI generiert Code, Telegram /link CODE löst ein) - TelegramLinkRecord Model
This commit is contained in:
1 parent
81714b1f4c
commit
0dd7c38751
7 files changed
+1108
-5
No files matched your search
@@ -17,8 +17,8 @@ public class AuthMiddleware
|
||||
{
|
||||
var path = ctx.Request.Path.Value ?? "";
|
||||
|
||||
// Static files and login endpoint don't require auth
|
||||
if (!path.StartsWith("/api/") || path == "/api/auth/login")
|
||||
// Static files, login and telegram webhook don't require auth
|
||||
if (!path.StartsWith("/api/") || path == "/api/auth/login" || path == "/api/telegram/webhook")
|
||||
{
|
||||
await _next(ctx);
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user