mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 09:20:19 +01:00
Allow long text to be sent via notification replies.
This commit is contained in:
committed by
Michelle Tang
parent
5bce2884a7
commit
acbab9e736
@@ -15,6 +15,7 @@ import org.thoughtcrime.securesms.database.model.databaseprotos.MessageExtras
|
||||
import org.thoughtcrime.securesms.linkpreview.LinkPreview
|
||||
import org.thoughtcrime.securesms.recipients.Recipient
|
||||
import org.thoughtcrime.securesms.sms.GroupV2UpdateMessageUtil
|
||||
import kotlin.time.Duration.Companion.seconds
|
||||
|
||||
/**
|
||||
* Represents all the data needed for an outgoing message.
|
||||
@@ -469,6 +470,24 @@ data class OutgoingMessage(
|
||||
)
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun quickReply(
|
||||
threadRecipient: Recipient,
|
||||
slideDeck: SlideDeck?,
|
||||
body: String,
|
||||
parentStoryId: ParentStoryId?
|
||||
): OutgoingMessage {
|
||||
return OutgoingMessage(
|
||||
threadRecipient = threadRecipient,
|
||||
sentTimeMillis = System.currentTimeMillis(),
|
||||
expiresIn = threadRecipient.expiresInSeconds.seconds.inWholeMilliseconds,
|
||||
attachments = slideDeck?.asAttachments() ?: emptyList(),
|
||||
body = body,
|
||||
parentStoryId = parentStoryId,
|
||||
isSecure = true
|
||||
)
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun buildMessage(slideDeck: SlideDeck, message: String): String {
|
||||
return if (message.isNotEmpty() && slideDeck.body.isNotEmpty()) {
|
||||
|
||||
Reference in New Issue
Block a user