2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-05 08:55:59 +00:00

Implement free megagroup emoji set.

This commit is contained in:
John Preston
2024-02-09 14:32:29 +04:00
parent 08efa73b2b
commit 571f1a5179
25 changed files with 317 additions and 69 deletions

View File

@@ -10,7 +10,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "history/history_widget.h"
#include "history/history.h" // History::session
#include "history/history_item.h" // HistoryItem::originalText
#include "history/history_item_helpers.h" // DropCustomEmoji
#include "history/history_item_helpers.h" // DropDisallowedCustomEmoji
#include "base/qthelp_regex.h"
#include "base/qthelp_url.h"
#include "base/event_filter.h"
@@ -278,11 +278,9 @@ TextWithTags PrepareEditText(not_null<HistoryItem*> item) {
auto original = item->history()->session().supportMode()
? StripSupportHashtag(item->originalText())
: item->originalText();
const auto dropCustomEmoji = !item->history()->session().premium()
&& !item->history()->peer->isSelf();
if (dropCustomEmoji) {
original = DropCustomEmoji(std::move(original));
}
original = DropDisallowedCustomEmoji(
item->history()->peer,
std::move(original));
return TextWithTags{
original.text,
TextUtilities::ConvertEntitiesToTextTags(original.entities)