Skip to content

Commit 0698fcd

Browse files
committed
Add AyuGram parity extras: Local Premium, marks, proactive media, DB I/O
Ship remaining mobile-relevant AyuGram gaps in Extras: - Local Premium (client-side stealth/HD stories + emoji/sticker cosmetics) - Custom deleted/edited marks and proactive Save Media download - Hide blocked users in members + reaction lists - Regex filters import via tg://ayu/filters/import/... - Export/import MessageSaving JSON DB from Extras Co-authored-by: D3C0Y <decoder-dev@users.noreply.github.com>
1 parent f857220 commit 0698fcd

16 files changed

Lines changed: 646 additions & 53 deletions

File tree

‎docs/SIDELOAD.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,12 @@ features (stored in AccountManager + App Group UserDefaults for NSE):
8181
| Save Edit History | Keep previous text when others edit; **Edit History** in the message context menu |
8282
| Also Save Bot Messages | Include bot chats in the deleted/edit snapshot store |
8383
| Save Stories & Protected Media | Save others’ stories to Photos without Premium; also when forwarding is disabled (AyuGram Desktop “No Copy & Download Restrictions”) |
84+
| Proactively Download Media | Start fetching attachments before delete/TTL so Save Media can keep a durable copy |
85+
| Deleted / Edited Marks | Customize the 🧹 deleted prefix and the “edited” label in chat |
86+
| Export / Import Saved Messages DB | Share or restore the local deleted/edit-history JSON store (`ayu-message-saving.json`; attachment files not bundled) |
87+
| Regex Filters Import | `tg://ayu/filters/import/<host/path>` pulls patterns from allowlisted paste hosts |
88+
| Hide Blocked Users | Hide blocked peers in chat, members lists, and reaction lists |
89+
| Local Telegram Premium | Client-side only: unlocks Story Stealth Mode, HD story quality, and sticker/emoji picker cosmetics on this device. Doesn't touch your real Premium status — nothing server-enforced (sends, quotas, your badge to others) changes |
8490

8591
Settings → Support footer shows `Telegram VERSION (BUILD)` and `decoder-dev`. Archive tip sheets / auto-archive suggestion alerts are suppressed.
8692

‎submodules/Components/ReactionListContextMenuContent/Sources/ReactionListContextMenuContent.swift‎

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -774,14 +774,24 @@ public final class ReactionListContextMenuContent: ContextControllerItemsContent
774774

775775
let mergedItems: [EngineMessageReactionListContext.Item]
776776

777-
init(listState: EngineMessageReactionListContext.State, readStats: MessageReadStats?) {
777+
init(listState: EngineMessageReactionListContext.State, readStats: MessageReadStats?, accountPeerId: EnginePeer.Id) {
778778
self.listState = listState
779779
self.readStats = readStats
780780

781-
var mergedItems: [EngineMessageReactionListContext.Item] = listState.items
781+
// AyuGram Message Filters: Hide Blocked Users also hides their reactions/seen entries here.
782+
let hideBlocked = ForkExtrasHotFlags.hideBlockedMessages
783+
let blockedPeerIds: Set<EnginePeer.Id> = hideBlocked ? ForkBlockedPeersFilter.snapshot(accountPeerId: accountPeerId).peerIds : []
784+
func isBlocked(_ peerId: EnginePeer.Id) -> Bool {
785+
return hideBlocked && peerId != accountPeerId && blockedPeerIds.contains(peerId)
786+
}
787+
788+
var mergedItems: [EngineMessageReactionListContext.Item] = listState.items.filter { !isBlocked($0.peer.id) }
782789
if !listState.canLoadMore, let readStats = readStats {
783790
var existingPeers = Set(mergedItems.map(\.peer.id))
784791
for peer in readStats.peers {
792+
if isBlocked(peer.id) {
793+
continue
794+
}
785795
if !existingPeers.contains(peer.id) {
786796
existingPeers.insert(peer.id)
787797
mergedItems.append(EngineMessageReactionListContext.Item(peer: peer, reaction: nil, timestamp: readStats.readTimestamps[peer.id], timestampIsReaction: false))
@@ -885,7 +895,7 @@ public final class ReactionListContextMenuContent: ContextControllerItemsContent
885895
self.deleteReaction = deleteReaction
886896

887897
self.listContext = context.engine.messages.messageReactionList(message: message, readStats: readStats, reaction: reaction)
888-
self.state = ItemsState(listState: EngineMessageReactionListContext.State(message: message, readStats: readStats, reaction: reaction), readStats: readStats)
898+
self.state = ItemsState(listState: EngineMessageReactionListContext.State(message: message, readStats: readStats, reaction: reaction), readStats: readStats, accountPeerId: context.account.peerId)
889899

890900
self.scrollNode = ASScrollNode()
891901
self.separatorNode = ASDisplayNode()
@@ -916,7 +926,7 @@ public final class ReactionListContextMenuContent: ContextControllerItemsContent
916926
guard let strongSelf = self else {
917927
return
918928
}
919-
let updatedState = ItemsState(listState: state, readStats: strongSelf.state.readStats)
929+
let updatedState = ItemsState(listState: state, readStats: strongSelf.state.readStats, accountPeerId: strongSelf.context.account.peerId)
920930
var animateIn = false
921931
if strongSelf.state.item(at: 0) == nil && updatedState.item(at: 0) != nil {
922932
animateIn = true

0 commit comments

Comments
 (0)