Skip to content

Commit 94ae84a

Browse files
authored
feat(Instagram): Add Anonymous story viewing patch (#6263)
1 parent 4febb2e commit 94ae84a

File tree

3 files changed

+36
-0
lines changed

3 files changed

+36
-0
lines changed

patches/api/patches.api

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,10 @@ public final class app/revanced/patches/instagram/feed/LimitFeedToFollowedProfil
276276
public static final fun getLimitFeedToFollowedProfiles ()Lapp/revanced/patcher/patch/BytecodePatch;
277277
}
278278

279+
public final class app/revanced/patches/instagram/ghost/story/AnonymousStoryViewingPatchKt {
280+
public static final fun getAnonymousStoryViewingPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
281+
}
282+
279283
public final class app/revanced/patches/instagram/hide/explore/HideExploreFeedKt {
280284
public static final fun getHideExploreFeedPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
281285
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package app.revanced.patches.instagram.ghost.story
2+
3+
import app.revanced.patcher.patch.bytecodePatch
4+
import app.revanced.util.Utils.trimIndentMultiline
5+
import app.revanced.util.returnEarly
6+
7+
@Suppress("unused")
8+
val anonymousStoryViewingPatch = bytecodePatch(
9+
name = "Anonymous story viewing",
10+
description = """
11+
View stories without sending any information to the server.
12+
Your view will not appear in the story viewers list.
13+
Note: Since no data is sent, a story you have already viewed may appear as new on another device.
14+
""".trimIndentMultiline(),
15+
use = false
16+
) {
17+
compatibleWith("com.instagram.android")
18+
19+
execute {
20+
// Prevent the hashmap of the seen media to be filled
21+
setMediaSeenHashmapFingerprint.method.returnEarly()
22+
}
23+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package app.revanced.patches.instagram.ghost.story
2+
3+
import app.revanced.patcher.fingerprint
4+
5+
internal val setMediaSeenHashmapFingerprint = fingerprint {
6+
parameters()
7+
returns("V")
8+
strings("media/seen/")
9+
}

0 commit comments

Comments
 (0)