mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 14:38:15 +00:00
Support cloud-saved paid reaction privacy.
This commit is contained in:
@@ -7,6 +7,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
*/
|
||||
#include "data/data_channel.h"
|
||||
|
||||
#include "api/api_global_privacy.h"
|
||||
#include "data/data_changes.h"
|
||||
#include "data/data_channel_admins.h"
|
||||
#include "data/data_user.h"
|
||||
@@ -971,6 +972,9 @@ PeerId ChannelData::groupCallDefaultJoinAs() const {
|
||||
|
||||
void ChannelData::setAllowedReactions(Data::AllowedReactions value) {
|
||||
if (_allowedReactions != value) {
|
||||
if (value.paidEnabled) {
|
||||
session().api().globalPrivacy().loadPaidReactionAnonymous();
|
||||
}
|
||||
const auto enabled = [](const Data::AllowedReactions &allowed) {
|
||||
return (allowed.type != Data::AllowedReactionsType::Some)
|
||||
|| !allowed.some.empty()
|
||||
|
Reference in New Issue
Block a user