fix: 群聊多消息发送间隔期间重新检查禁言状态
每条消息发送前都检查IsGroupMuted,防止发送间隔期间被禁言 导致后续消息仍然发出。检测到禁言后break跳过所有剩余消息。 Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -509,6 +509,15 @@ func startOBv11Readers(router *bridge.PlatformRouter) {
|
||||
case <-time.After(interval):
|
||||
}
|
||||
}
|
||||
// 每条消息发送前重新检查禁言——间隔期间可能被禁
|
||||
if messageType == "group" {
|
||||
if cur, err := router.GetAdapter(adapterKey); err == nil {
|
||||
if qa, ok := cur.(*qqadapter.Adapter); ok && qa.IsGroupMuted(groupID) {
|
||||
fmt.Printf("[qq:%s] 群 %d 发送间隔期间被禁言,跳过剩余消息\n", adapterKey, groupID)
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
cur, err := router.GetAdapter(adapterKey)
|
||||
if err != nil {
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user