mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-22 01:40:07 +01:00
Remove SignalServiceContent.
This commit is contained in:
@@ -12,10 +12,8 @@ import org.thoughtcrime.securesms.groups.GroupId
|
||||
import org.thoughtcrime.securesms.linkpreview.LinkPreview
|
||||
import org.thoughtcrime.securesms.recipients.RecipientId
|
||||
import org.whispersystems.signalservice.api.messages.SignalServiceAttachment
|
||||
import org.whispersystems.signalservice.api.messages.SignalServiceContent
|
||||
import org.whispersystems.signalservice.api.messages.SignalServiceGroupV2
|
||||
import java.util.Optional
|
||||
import java.util.UUID
|
||||
|
||||
class IncomingMediaMessage(
|
||||
val from: RecipientId?,
|
||||
@@ -144,28 +142,4 @@ class IncomingMediaMessage(
|
||||
isPaymentsActivated = paymentsActivated,
|
||||
messageRanges = messageRanges
|
||||
)
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun createIncomingPaymentNotification(
|
||||
from: RecipientId,
|
||||
content: SignalServiceContent,
|
||||
receivedTime: Long,
|
||||
expiresIn: Long,
|
||||
paymentUuid: UUID
|
||||
): IncomingMediaMessage {
|
||||
return IncomingMediaMessage(
|
||||
from = from,
|
||||
body = paymentUuid.toString(),
|
||||
sentTimeMillis = content.timestamp,
|
||||
serverTimeMillis = content.serverReceivedTimestamp,
|
||||
receivedTimeMillis = receivedTime,
|
||||
expiresIn = expiresIn,
|
||||
isUnidentified = content.isNeedsReceipt,
|
||||
serverGuid = content.serverUuid,
|
||||
isPushMessage = true,
|
||||
isPaymentsNotification = true
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user