Skip to content

Commit

Permalink
chore: tg 端入群通知显示 rich header
Browse files Browse the repository at this point in the history
  • Loading branch information
clansty committed Jan 25, 2025
1 parent 59d4e9b commit 21c0f1c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions main/src/controllers/ForwardController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,12 @@ export default class ForwardController {
if (!pair) return false;
if ((pair?.flags | this.instance.flags) & flags.DISABLE_JOIN_NOTICE) return false;
const hideAllQqNumber = (pair.flags | this.instance.flags) & flags.HIDE_ALL_QQ_NUMBER;
const avatar = await getAvatar(event.userId);
await pair.tg.sendMessage({
file: new CustomFile('avatar.png', avatar.length, '', avatar),
file: new Api.InputMediaWebPage({
url: helper.generateRichHeaderUrl(pair.apiKey, event.userId),
forceSmallMedia: true,
optional: true,
}),
message: `<b>${event.nickname}</b>${hideAllQqNumber ? '' : ` (<code>${event.userId}</code>)`} <i>加入了本群</i>`,
silent: true,
});
Expand Down

0 comments on commit 21c0f1c

Please sign in to comment.