mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-08-03 18:49:30 +00:00
feat: filter zalgo
This commit is contained in:
@@ -20,6 +20,11 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "apiwrap.h"
|
||||
#include "api/api_invite_links.h"
|
||||
|
||||
// AyuGram includes
|
||||
#include "ayu/ayu_settings.h"
|
||||
#include "ayu/utils/telegram_helpers.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
using UpdateFlag = Data::PeerUpdate::Flag;
|
||||
@@ -112,7 +117,12 @@ bool ChatData::anyoneCanAddMembers() const {
|
||||
}
|
||||
|
||||
void ChatData::setName(const QString &newName) {
|
||||
updateNameDelayed(newName.isEmpty() ? name() : newName, {}, {});
|
||||
auto filteredName = newName;
|
||||
const auto &settings = AyuSettings::getInstance();
|
||||
if (settings.filterZalgo) {
|
||||
filteredName = filterZalgo(filteredName);
|
||||
}
|
||||
updateNameDelayed(filteredName.isEmpty() ? name() : filteredName, {}, {});
|
||||
}
|
||||
|
||||
void ChatData::applyEditAdmin(not_null<UserData*> user, bool isAdmin) {
|
||||
|
||||
Reference in New Issue
Block a user