Skip to content

Commit

Permalink
feat: 聊天记录可使用 tg app 打开
Browse files Browse the repository at this point in the history
  • Loading branch information
clansty committed Jun 29, 2024
1 parent e6ff038 commit 0be83ab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions main/src/models/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const configParsed = z.object({
PROXY_PASSWORD: z.string().optional(),
TGS_TO_GIF: z.string().default('tgs_to_gif'),
CRV_API: z.string().url().optional(),
CRV_VIEWER_APP: z.string().url().startsWith('https://t.me/').optional(),
CRV_KEY: z.string().optional(),
ZINC_URL: z.string().url().optional(),
ZINC_USERNAME: z.string().optional(),
Expand Down
3 changes: 2 additions & 1 deletion main/src/services/ForwardService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ export default class ForwardService {
const messages = await pair.qq.getForwardMsg(resId);
message = helper.generateForwardBrief(messages);
const hash = md5Hex(resId);
buttons.push(Button.url('📃查看', `${env.CRV_API}/?hash=${hash}`));
const viewerUrl = env.CRV_VIEWER_APP ? `${env.CRV_VIEWER_APP}?startapp=${hash}` : `${env.CRV_API}/?hash=${hash}`;
buttons.push(Button.url('📃查看', viewerUrl));
// 传到 Cloudflare
axios.post(`${env.CRV_API}/add`, {
auth: env.CRV_KEY,
Expand Down

0 comments on commit 0be83ab

Please sign in to comment.