diff --git a/src/main/kotlin/de/fabianonline/telegram_backup/mediafilemanager/StickerFileManager.kt b/src/main/kotlin/de/fabianonline/telegram_backup/mediafilemanager/StickerFileManager.kt index 0f85ad2..028bb39 100644 --- a/src/main/kotlin/de/fabianonline/telegram_backup/mediafilemanager/StickerFileManager.kt +++ b/src/main/kotlin/de/fabianonline/telegram_backup/mediafilemanager/StickerFileManager.kt @@ -63,11 +63,12 @@ class StickerFileManager(message: JsonObject, file_base: String) : DocumentFileM private val filenameBase: String get() { - val stickerSet = sticker["stickerset"].obj + val stickerSet = sticker["stickerset"].obj val set = stickerSet.get("shortName").nullString - ?: stickerSet.get("id").nullString - ?: stickerSet.get("_constructor").nullString - ?: error("could not get a good name from: ${sticker["stickerset"]}") + ?: stickerSet.get("id").nullString + ?: stickerSet.get("_constructor").nullString + ?: error("could not get a good name from: ${sticker["stickerset"]}") + val hash = sticker["alt"].string.hashCode() return "${set}_${hash}" }