米游社公告定时任务推送前,判断是否存在群关系 (#36)

This commit is contained in:
2023-03-21 02:47:56 +08:00 committed by GitHub
parent 785c6f33a3
commit e9513c2fb8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -395,6 +395,12 @@ export default class MysNews extends base {
let sended = await redis.get(`${this.key}${groupId}:${postId}`) let sended = await redis.get(`${this.key}${groupId}:${postId}`)
if (sended) return if (sended) return
// 判断是否存在群关系
if (!Bot.gl.get(Number(groupId))) {
logger.error(`[米游社${typeName}推送] 群${groupId}未关联`)
return
}
if (!this[postId]) { if (!this[postId]) {
const param = await this.newsDetail(postId) const param = await this.newsDetail(postId)