From a301217e623f1c73367f7d1bce377c1a43c33f06 Mon Sep 17 00:00:00 2001 From: rhunk <101876869+rhunk@users.noreply.github.com> Date: Wed, 10 Apr 2024 21:53:39 +0200 Subject: [PATCH] fix(core/media_downloader): playable story snap record username --- .../core/features/impl/downloader/MediaDownloader.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/src/main/kotlin/me/rhunk/snapenhance/core/features/impl/downloader/MediaDownloader.kt b/core/src/main/kotlin/me/rhunk/snapenhance/core/features/impl/downloader/MediaDownloader.kt index 01f374e9..9a27aca8 100644 --- a/core/src/main/kotlin/me/rhunk/snapenhance/core/features/impl/downloader/MediaDownloader.kt +++ b/core/src/main/kotlin/me/rhunk/snapenhance/core/features/impl/downloader/MediaDownloader.kt @@ -298,7 +298,9 @@ class MediaDownloader : MessagingRuleFeature("MediaDownloader", MessagingRuleTyp }?.let { playlistGroup -> val playlistGroupString = playlistGroup.toString() - val storyUserId = paramMap["TOPIC_SNAP_CREATOR_USER_ID"]?.toString() ?: if (playlistGroupString.contains("storyUserId=")) { + val storyUserId = paramMap["TOPIC_SNAP_CREATOR_USER_ID"]?.toString() ?: paramMap["PLAYABLE_STORY_SNAP_RECORD"]?.toString()?.let { + if (it.contains("userId=")) it.substringAfter("userId=").substringBefore(",") else null + } ?: if (playlistGroupString.contains("storyUserId=")) { playlistGroupString.substringAfter("storyUserId=").substringBefore(",") } else { //story replies