From eb98ccc6dc4d11d9cc59bcb81ba72c5b2dd02a46 Mon Sep 17 00:00:00 2001 From: Allan Galarza Date: Sun, 11 Aug 2024 08:03:33 -0700 Subject: [PATCH] Fix getMemberOrNull and getGuildMembers caching user data instead of member data --- core/src/commonMain/kotlin/supplier/StoreEntitySupplier.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/commonMain/kotlin/supplier/StoreEntitySupplier.kt b/core/src/commonMain/kotlin/supplier/StoreEntitySupplier.kt index 0c53ee6adad4..d54703aa4deb 100644 --- a/core/src/commonMain/kotlin/supplier/StoreEntitySupplier.kt +++ b/core/src/commonMain/kotlin/supplier/StoreEntitySupplier.kt @@ -61,7 +61,7 @@ public class StoreEntitySupplier( } override suspend fun getMemberOrNull(guildId: Snowflake, userId: Snowflake): Member? { - return storeAndReturn(supplier.getMemberOrNull(guildId, userId)) { it.data } + return storeAndReturn(supplier.getMemberOrNull(guildId, userId)) { it.memberData } } override suspend fun getMessageOrNull(channelId: Snowflake, messageId: Snowflake): Message? { @@ -105,7 +105,7 @@ public class StoreEntitySupplier( } override fun getGuildMembers(guildId: Snowflake, limit: Int?): Flow { - return storeOnEach(supplier.getGuildMembers(guildId, limit)) { it.data } + return storeOnEach(supplier.getGuildMembers(guildId, limit)) { it.memberData } } override fun getGuildVoiceRegions(guildId: Snowflake): Flow {