code tweak for #9685

pull/9698/head
Thibault Duplessis 2021-08-29 09:50:43 +02:00
parent f233494656
commit f2e3d23061
1 changed files with 1 additions and 1 deletions

View File

@ -12,7 +12,7 @@ final class PromotionApi(domain: NetDomain) {
user.isVerified || user.isAdmin || {
val promotions = extract(text)
promotions.isEmpty || {
val prevTextPromotion = extract(~prevText)
val prevTextPromotion = prevText ?? extract
val prev = ~cache.getIfPresent(user.id) -- prevTextPromotion
val accept = prev.sizeIs < 3 && !prev.exists(promotions.contains)
if (!accept) logger.info(s"Promotion @${user.username} ${identify(text) mkString ", "}")