recheck-fix2

This commit is contained in:
Untone 2024-09-29 08:25:30 +03:00
parent 6385d48d7c
commit 17cc9dd8b6

View File

@ -119,7 +119,7 @@ async def messages_routing(msg, state):
nospaces_text_score = detector(nospaces_text)
logger.info(f'no spaces text toxic: {nospaces_text_score}')
if nospaces_text != text and nospaces_text_score > toxic_score:
toxic_score = nospaces_text + 10
toxic_score = nospaces_text_score + 10
await redis.set(f"toxic:{cid}", mid)
await redis.set(f"toxic:{cid}:{uid}:{mid}", toxic_perc, ex=60 * 60 * 24 * 3)