Skip to content

Commit 5776de3

Browse files
committed
fix(Sync for Reddit - Spoof client): Fix patch by using correct fingerprints
1 parent a0ad07e commit 5776de3

File tree

1 file changed

+6
-6
lines changed
  • patches/src/main/kotlin/app/revanced/patches/reddit/customclients/sync/syncforreddit/api

1 file changed

+6
-6
lines changed

patches/src/main/kotlin/app/revanced/patches/reddit/customclients/sync/syncforreddit/api/SpoofClientPatch.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,20 +63,20 @@ val spoofClientPatch = spoofClientPatch(
6363
val randomName = (0..100000).random()
6464
val userAgent = "$randomName:app.revanced.$randomName:v1.0.0 (by /u/revanced)"
6565

66-
imgurImageAPIFingerprint.method.replaceInstruction(
66+
getUserAgentFingerprint.method.replaceInstruction(
6767
0,
6868
"""
69-
const-string v0, "$userAgent"
70-
return-object v0
71-
""",
69+
const-string v0, "$userAgent"
70+
return-object v0
71+
""",
7272
)
7373

7474
// endregion
7575

7676
// region Patch Imgur API URL.
7777

78-
val apiUrlIndex = getUserAgentFingerprint.stringMatches!!.first().index
79-
getUserAgentFingerprint.method.replaceInstruction(
78+
val apiUrlIndex = imgurImageAPIFingerprint.stringMatches!!.first().index
79+
imgurImageAPIFingerprint.method.replaceInstruction(
8080
apiUrlIndex,
8181
"const-string v1, \"https://api.imgur.com/3/image\"",
8282
)

0 commit comments

Comments
 (0)