Onuray's review

This commit is contained in:
Benoit Marty 2020-10-08 14:19:56 +02:00
parent e33bc7146b
commit 1dfc739f19
2 changed files with 4 additions and 4 deletions

View File

@ -65,11 +65,11 @@ interface ReadService {
/**
* Get the eventId where the read receipt for the provided user is
* @param otherUserId the userId param to look for
* @param userId the id of the user to look for
*
* @return the eventId where the read receipt for the provided user is attached, or null if not found
*/
fun getUserReadReceipt(otherUserId: String): String?
fun getUserReadReceipt(userId: String): String?
/**
* Returns a live list of read receipts for a given event

View File

@ -107,10 +107,10 @@ internal class DefaultReadService @AssistedInject constructor(
}
}
override fun getUserReadReceipt(otherUserId: String): String? {
override fun getUserReadReceipt(userId: String): String? {
var eventId: String? = null
monarchy.doWithRealm {
eventId = ReadReceiptEntity.where(it, roomId = roomId, userId = otherUserId)
eventId = ReadReceiptEntity.where(it, roomId = roomId, userId = userId)
.findFirst()
?.eventId
}