Skip to content

Commit f02af59

Browse files
committed
Improve MessageReactions::toggle_paid_message_reaction_is_anonymous.
1 parent ede7a33 commit f02af59

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

td/telegram/MessageReaction.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1099,7 +1099,12 @@ bool MessageReactions::toggle_paid_message_reaction_is_anonymous(Td *td, Message
10991099
return true;
11001100
}
11011101
}
1102-
return pending_paid_reactions_ != 0;
1102+
if (pending_paid_reactions_ != 0) {
1103+
promise.set_value(Unit());
1104+
return true;
1105+
}
1106+
promise.set_error(Status::Error(400, "Message has no paid reaction"));
1107+
return false;
11031108
}
11041109

11051110
StringBuilder &operator<<(StringBuilder &string_builder, const MessageReactions &reactions) {

0 commit comments

Comments
 (0)