feat: 增加关联群不是超级群组的提示

This commit is contained in:
Clansty 2022-03-16 23:05:21 +08:00
parent 3291a1664e
commit b7e058062d
No known key found for this signature in database
GPG Key ID: 3A6BE8BAF2EDE134
1 changed files with 7 additions and 1 deletions

View File

@ -6,7 +6,6 @@ import { getAvatar } from '../utils/urls';
import { CustomFile } from 'telegram/client/uploads';
import db from '../models/db';
import { Api, utils } from 'telegram';
import commands from '../constants/commands';
import OicqClient from '../client/OicqClient';
import { md5 } from '../utils/hashing';
import TelegramChat from '../client/TelegramChat';
@ -242,6 +241,13 @@ export default class ConfigService {
await this.instance.forwardPairs.add(qGroup, tgChat);
await tgChat.sendMessage(`QQ群${qGroup.name} (<code>${qGroup.group_id}</code>)已与 ` +
`Telegram 群 ${(tgChat.entity as Api.Channel).title} (<code>${tgChatId}</code>)关联`);
if (!(tgChat.entity instanceof Api.Channel)) {
// TODO 添加一个转换为超级群组的方法链接
await tgChat.sendMessage({
message: '请注意,这个群不是超级群组。一些功能,比如说同步撤回,可能会工作不正常。建议将此群组转换为超级群组',
linkPreview: false,
});
}
}
catch (e) {
this.log.error(e);