mirror of https://github.com/Nofated095/Q2TG.git
Update ForwardPairs.ts
This commit is contained in:
parent
bdb4b6e2d5
commit
17cd61d6a3
|
@ -76,21 +76,4 @@ export default class ForwardPairs {
|
|||
return this.pairs.find(e => e.tg.id.eq(target.id));
|
||||
}
|
||||
}
|
||||
|
||||
public async initMapInstance(instances: Instance[]) {
|
||||
for (const forwardPair of this.pairs) {
|
||||
for (const instance of instances) {
|
||||
const instanceTgUserId = instance.userMe.id.toString();
|
||||
if (forwardPair.instanceMapForTg[instanceTgUserId]) continue;
|
||||
try {
|
||||
const group = instance.oicq.getChat(forwardPair.qqRoomId) as Group;
|
||||
if (!group) continue;
|
||||
forwardPair.instanceMapForTg[instanceTgUserId] = group;
|
||||
this.log.info('MapInstance', { group: forwardPair.qqRoomId, tg: instanceTgUserId, qq: instance.qqUin });
|
||||
}
|
||||
catch {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue