Fix history reducing alghorithm
This commit is contained in:
parent
0791825e01
commit
bcfe0e968f
@ -215,7 +215,7 @@ class AIResponder(object):
|
||||
del self.history[0]
|
||||
else:
|
||||
current = self.history[index]
|
||||
count = sum(1 for item in self.history[index:] if item.get('channel') == current.get('channel'))
|
||||
count = sum(1 for item in self.history if item.get('channel') == current.get('channel'))
|
||||
if count > self.config.get('history-per-channel', 3):
|
||||
del self.history[index]
|
||||
else:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user