Skip to content

Commit

Permalink
Fix getMemberOrNull and getGuildMembers caching user data instead of …
Browse files Browse the repository at this point in the history
…member data
  • Loading branch information
Galarzaa90 committed Aug 11, 2024
1 parent 5bcb0e3 commit eb98ccc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/commonMain/kotlin/supplier/StoreEntitySupplier.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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? {
Expand Down Expand Up @@ -105,7 +105,7 @@ public class StoreEntitySupplier(
}

override fun getGuildMembers(guildId: Snowflake, limit: Int?): Flow<Member> {
return storeOnEach(supplier.getGuildMembers(guildId, limit)) { it.data }
return storeOnEach(supplier.getGuildMembers(guildId, limit)) { it.memberData }
}

override fun getGuildVoiceRegions(guildId: Snowflake): Flow<Region> {
Expand Down

0 comments on commit eb98ccc

Please sign in to comment.