From 072cba1396d665449a98259f9f33436ca46ff214 Mon Sep 17 00:00:00 2001 From: levlam Date: Wed, 14 Aug 2024 04:41:48 +0300 Subject: [PATCH] Improve MessageReactor::is_valid(). --- td/telegram/MessageReactor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/td/telegram/MessageReactor.h b/td/telegram/MessageReactor.h index e32000511..f0b889b7d 100644 --- a/td/telegram/MessageReactor.h +++ b/td/telegram/MessageReactor.h @@ -42,7 +42,7 @@ class MessageReactor { } bool is_valid() const { - return (dialog_id_.is_valid() || (!is_me_ && !is_anonymous_)) && count_ > 0 && (is_top_ || is_me_); + return count_ > 0 && (is_me_ ? dialog_id_.is_valid() : (dialog_id_.is_valid() || is_anonymous_) && is_top_); } bool is_me() const {