feat(telegram): send author avatar as richheader link-preview card

Serve an OG page at /api/richheader and use a small link-preview card
(avatar + author name) above the message instead of sending a photo.
This commit is contained in:
RhenCloud committed 2026-08-03 07:30:25 +08:00
1 parent be50d23319
commit fc2e2c2efa
5 files changed
+61 -1

No files matched your search

+2
View File
@@ -10,6 +10,7 @@ import { createActionRoutes } from "./web/action-routes";
import { createAdminRoutes } from "./web/admin-routes";
import { createLegalRoutes } from "./web/legal-routes";
import { createHomeRoutes } from "./web/home-routes";
import { createRichHeaderRoutes } from "./web/richheader-routes";
import { loadConfig } from "./config";
import { log } from "./lib/log";
@@ -25,6 +26,7 @@ export function createServer(): Hono<{ Bindings: Env }> {
app.route("/", createLegalRoutes());
app.route("/", createHomeRoutes());
app.route("/admin", createAdminRoutes());
app.route("/api", createRichHeaderRoutes());
app.post("/webhook", async (c) => {
const contentLength = Number(c.req.header("content-length") ?? 0);