mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 14:38:15 +00:00
Proof-of-concept custom verify badges.
This commit is contained in:
@@ -30,6 +30,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "api/api_chat_invite.h"
|
||||
#include "api/api_invite_links.h"
|
||||
#include "apiwrap.h"
|
||||
#include "ui/unread_badge.h"
|
||||
#include "window/notifications_manager.h"
|
||||
|
||||
namespace {
|
||||
@@ -713,6 +714,24 @@ bool ChannelData::canRestrictParticipant(
|
||||
return adminRights() & AdminRight::BanUsers;
|
||||
}
|
||||
|
||||
void ChannelData::setVerifyDetails(Ui::VerifyDetails details) {
|
||||
if (_verifyDetails && !verifiedByTelegram() && !details) {
|
||||
return; AssertIsDebug();
|
||||
}
|
||||
if (!details) {
|
||||
if (_verifyDetails) {
|
||||
_verifyDetails = nullptr;
|
||||
session().changes().peerUpdated(this, UpdateFlag::VerifyInfo);
|
||||
}
|
||||
} else if (!_verifyDetails) {
|
||||
_verifyDetails = std::make_unique<Ui::VerifyDetails>(details);
|
||||
session().changes().peerUpdated(this, UpdateFlag::VerifyInfo);
|
||||
} else if (*_verifyDetails != details) {
|
||||
*_verifyDetails = details;
|
||||
session().changes().peerUpdated(this, UpdateFlag::VerifyInfo);
|
||||
}
|
||||
}
|
||||
|
||||
void ChannelData::setAdminRights(ChatAdminRights rights) {
|
||||
if (rights == adminRights()) {
|
||||
return;
|
||||
|
Reference in New Issue
Block a user