arcanegram/patches/feature/streamer-mode-autocomplete.patch
devilreef a3c58ae970
feat(patches): streamer mode hooks across name/avatar/style/identity
13 stgit patches anonymizing non-self users when toggle is on:
- name/typing/reply-shorten/forward: pseudonym in name accessors and
  firstName bypass paths (forward-header bake also covered via name())
- avatar/call-avatar/short-info-box: force empty userpic at chokepoint
  + fullscreen-call + profile-photo carousel bypasses
- style/badge: strip color, background emoji, premium emoji status,
  verified/scam/fake/bot-verify badges
- profile-identity/profile-actions/online: hide phone/username/bio/
  common-chats/birthday/peer-id/joined-channel/last-seen + presence dot
- autocomplete/search: hide @username in mention popup, dialogs search
  rows, and drag-mime to suppress clipboard leak

Plus ag_refresh::ForEachLoadedPeer helper and toggle handler that
invalidates empty-userpic cache and emits peer-update flags so live
toggle propagates to open profile pages and dialog rows.
2026-05-01 16:43:24 +06:00

34 lines
1.2 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: devilreef <devilreef@femboy.page>
Date: Fri, 1 May 2026 16:16:09 +0600
Subject: [PATCH] streamer mode: hide username in mention autocomplete
---
Telegram/SourceFiles/chat_helpers/field_autocomplete.cpp | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/Telegram/SourceFiles/chat_helpers/field_autocomplete.cpp b/Telegram/SourceFiles/chat_helpers/field_autocomplete.cpp
index 0000000..0000000 100644
--- a/Telegram/SourceFiles/chat_helpers/field_autocomplete.cpp
+++ b/Telegram/SourceFiles/chat_helpers/field_autocomplete.cpp
@@ -52,12 +52,17 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "styles/style_chat_helpers.h"
#include "styles/style_menu_icons.h"
+#include "arcanegram/features/streamer/ag_streamer.h"
+
#include <QtWidgets/QApplication>
namespace ChatHelpers {
namespace {
[[nodiscard]] QString PrimaryUsername(not_null<UserData*> user) {
+ if (Arcanegram::Streamer::ShouldAnonymize(user)) {
+ return QString();
+ }
const auto &usernames = user->usernames();
return usernames.empty() ? user->username() : usernames.front();
}
--
2.52.0.windows.1