File tree Expand file tree Collapse file tree
src/main/kotlin/li/auna/patches/telegram/pro Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -247,6 +247,10 @@ public final class li/auna/patches/telegram/ads/DisableAdsPatchKt {
247247 public static final fun getHideAdsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
248248}
249249
250+ public final class li/auna/patches/telegram/pro/UnlockProKt {
251+ public static final fun getUnlockProPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
252+ }
253+
250254public final class li/auna/patches/telegram/typingindicator/HideTypingIndicatorPatchKt {
251255 public static final fun getHideAdsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
252256}
Original file line number Diff line number Diff line change 1+ package li.auna.patches.telegram.pro
2+
3+ import app.revanced.patcher.fingerprint
4+
5+ internal val isPremiumUserFingerprint = fingerprint {
6+ returns(" Z" )
7+ custom { methodDef, classDef ->
8+ classDef.type.endsWith(" Lorg/telegram/messenger/MessagesController;" ) &&
9+ methodDef.name == " isPremiumUser"
10+ }
11+ }
12+
13+ internal val isPremiumFingerprint = fingerprint {
14+ returns(" Z" )
15+ custom { methodDef, classDef ->
16+ classDef.type.endsWith(" Lorg/telegram/messenger/UserConfig;" ) &&
17+ methodDef.name == " isPremium"
18+ }
19+ }
20+
21+ internal val isPremiumForStoryFingerprint = fingerprint {
22+ returns(" Z" )
23+ custom { methodDef, classDef ->
24+ classDef.type.endsWith(" Lorg/telegram/ui/Stories/StoriesController;" ) &&
25+ methodDef.name == " isPremium"
26+ }
27+ }
Original file line number Diff line number Diff line change 1+ package li.auna.patches.telegram.pro
2+
3+ import app.revanced.patcher.patch.bytecodePatch
4+ import li.auna.util.returnEarly
5+
6+ @Suppress(" unused" )
7+ val unlockProPatch = bytecodePatch(
8+ name = " Unlock Pro" ,
9+ description = " Unlock client-side Pro features" ,
10+ ) {
11+ compatibleWith(
12+ " org.telegram.messenger" ,
13+ " org.telegram.messenger.web"
14+ )
15+
16+ execute {
17+ setOf (
18+ isPremiumUserFingerprint,
19+ isPremiumFingerprint,
20+ isPremiumForStoryFingerprint
21+ ).forEach { it.method.returnEarly(true ) }
22+ }
23+ }
You can’t perform that action at this time.
0 commit comments