fix: 在私聊时不应该显示 RichHeader

This commit is contained in:
Clansty 2024-02-04 21:24:44 +08:00
parent 6a01f529f5
commit 000da5c93f
No known key found for this signature in database
GPG Key ID: 3A6BE8BAF2EDE134
1 changed files with 1 additions and 1 deletions

View File

@ -382,7 +382,7 @@ export default class ForwardService {
else if (files.length) {
messageToSend.file = files;
}
else if ((pair.flags | this.instance.flags) & flags.RICH_HEADER) {
else if (event.message_type === 'group' && (pair.flags | this.instance.flags) & flags.RICH_HEADER) {
// 没有文件时才能显示链接预览
richHeaderUsed = true;
const url = new URL('https://q2tg-header.clansty.workers.dev');