mirror of https://github.com/Nofated095/Q2TG.git
feat: 增加关联群不是超级群组的提示
This commit is contained in:
parent
3291a1664e
commit
b7e058062d
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue