mirror of
https://github.com/oxen-io/session-android.git
synced 2025-08-11 17:57:47 +00:00
send read receipt using new pipeline
This commit is contained in:
@@ -5,7 +5,7 @@ import org.session.libsignal.service.internal.push.SignalServiceProtos
|
||||
|
||||
class ReadReceipt() : ControlMessage() {
|
||||
|
||||
var timestamps: LongArray? = null
|
||||
var timestamps: List<Long>? = null
|
||||
|
||||
companion object {
|
||||
const val TAG = "ReadReceipt"
|
||||
@@ -15,12 +15,12 @@ class ReadReceipt() : ControlMessage() {
|
||||
if (receiptProto.type != SignalServiceProtos.ReceiptMessage.Type.READ) return null
|
||||
val timestamps = receiptProto.timestampList
|
||||
if (timestamps.isEmpty()) return null
|
||||
return ReadReceipt(timestamps = timestamps.toLongArray())
|
||||
return ReadReceipt(timestamps = timestamps)
|
||||
}
|
||||
}
|
||||
|
||||
//constructor
|
||||
internal constructor(timestamps: LongArray?) : this() {
|
||||
internal constructor(timestamps: List<Long>?) : this() {
|
||||
this.timestamps = timestamps
|
||||
}
|
||||
|
||||
|
@@ -50,7 +50,7 @@ fun MessageReceiver.handle(message: Message, proto: SignalServiceProtos.Content,
|
||||
|
||||
private fun MessageReceiver.handleReadReceipt(message: ReadReceipt) {
|
||||
val context = MessagingConfiguration.shared.context
|
||||
SSKEnvironment.shared.readReceiptManager.processReadReceipts(context, message.sender!!, message.timestamps!!.asList(), message.receivedTimestamp!!)
|
||||
SSKEnvironment.shared.readReceiptManager.processReadReceipts(context, message.sender!!, message.timestamps!!, message.receivedTimestamp!!)
|
||||
}
|
||||
|
||||
private fun MessageReceiver.handleTypingIndicator(message: TypingIndicator) {
|
||||
|
Reference in New Issue
Block a user