arcanegram/patches/feature/streamer-mode-short-info-box.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

35 lines
1.4 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: devilreef <devilreef@femboy.page>
Date: Fri, 1 May 2026 15:58:05 +0600
Subject: [PATCH] streamer mode: skip photo carousel in profile preview
---
Telegram/SourceFiles/boxes/peers/prepare_short_info_box.cpp | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/Telegram/SourceFiles/boxes/peers/prepare_short_info_box.cpp b/Telegram/SourceFiles/boxes/peers/prepare_short_info_box.cpp
index 0000000..0000000 100644
--- a/Telegram/SourceFiles/boxes/peers/prepare_short_info_box.cpp
+++ b/Telegram/SourceFiles/boxes/peers/prepare_short_info_box.cpp
@@ -7,6 +7,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#include "boxes/peers/prepare_short_info_box.h"
+#include "arcanegram/features/streamer/ag_streamer.h"
#include "base/unixtime.h"
#include "boxes/peers/peer_short_info_box.h"
#include "core/application.h"
@@ -323,7 +324,9 @@ void ValidatePhotoId(
bool ProcessCurrent(
not_null<PeerData*> peer,
not_null<UserpicState*> state) {
- const auto userpicPhotoId = peer->userpicPhotoId();
+ const auto userpicPhotoId = Arcanegram::Streamer::ShouldAnonymize(peer)
+ ? PhotoId{}
+ : peer->userpicPhotoId();
const auto userpicPhoto = (userpicPhotoId
&& (userpicPhotoId != PeerData::kUnknownPhotoId)
&& (state->userpicPhotoId != userpicPhotoId))
--
2.52.0.windows.1