Onuray's review
This commit is contained in:
parent
e33bc7146b
commit
1dfc739f19
|
@ -65,11 +65,11 @@ interface ReadService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the eventId where the read receipt for the provided user is
|
* 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
|
* @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
|
* Returns a live list of read receipts for a given event
|
||||||
|
|
|
@ -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
|
var eventId: String? = null
|
||||||
monarchy.doWithRealm {
|
monarchy.doWithRealm {
|
||||||
eventId = ReadReceiptEntity.where(it, roomId = roomId, userId = otherUserId)
|
eventId = ReadReceiptEntity.where(it, roomId = roomId, userId = userId)
|
||||||
.findFirst()
|
.findFirst()
|
||||||
?.eventId
|
?.eventId
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue