Send reactions.

This commit is contained in:
Nicholas Tinsley
2023-12-07 15:18:05 -05:00
committed by GitHub
parent a749b97707
commit 6aac250990
22 changed files with 414 additions and 34 deletions

View File

@@ -47,14 +47,6 @@ data class CallParticipant constructor(
}
}
fun getRecipientDisplayNameDeviceAgnostic(context: Context): String {
return if (recipient.isSelf) {
context.getString(R.string.CallParticipant__you)
} else {
recipient.getDisplayName(context)
}
}
fun getShortRecipientDisplayName(context: Context): String {
return if (recipient.isSelf && isPrimary) {
context.getString(R.string.CallParticipant__you)

View File

@@ -5,13 +5,14 @@
package org.thoughtcrime.securesms.events
import org.thoughtcrime.securesms.recipients.Recipient
import java.util.concurrent.TimeUnit
/**
* This is a data class to represent a reaction coming in over the wire in the format we need (mapped to a [CallParticipant]) in a way that can be easily
* This is a data class to represent a reaction coming in over the wire in the format we need (mapped to a [Recipient]) in a way that can be easily
* compared across Rx streams.
*/
data class GroupCallReactionEvent(val sender: CallParticipant, val reaction: String, val timestamp: Long) {
data class GroupCallReactionEvent(val sender: Recipient, val reaction: String, val timestamp: Long) {
fun getExpirationTimestamp(): Long {
return timestamp + TimeUnit.SECONDS.toMillis(LIFESPAN_SECONDS)
}