kopia lustrzana https://github.com/ryukoposting/Signal-Android
Ensure pre-upload media is properly fanned out to group stories.
rodzic
eb6a14e686
commit
a04590b658
|
@ -102,26 +102,23 @@ class AddToGroupStoryDelegate(
|
||||||
Log.d(TAG, "Sending preupload media.")
|
Log.d(TAG, "Sending preupload media.")
|
||||||
|
|
||||||
val recipient = Recipient.resolved(result.recipientId)
|
val recipient = Recipient.resolved(result.recipientId)
|
||||||
val secureMessage = OutgoingMessage(
|
val secureMessages = result.preUploadResults
|
||||||
recipient = recipient,
|
.mapNotNull { SignalDatabase.attachments.getAttachment(it.attachmentId) }
|
||||||
timestamp = System.currentTimeMillis(),
|
.map {
|
||||||
storyType = result.storyType,
|
Thread.sleep(5)
|
||||||
mentions = result.mentions.toList(),
|
OutgoingMessage(
|
||||||
isSecure = true
|
recipient = recipient,
|
||||||
)
|
timestamp = System.currentTimeMillis(),
|
||||||
|
storyType = result.storyType,
|
||||||
val threadId = SignalDatabase.threads.getOrCreateThreadIdFor(recipient)
|
isSecure = true,
|
||||||
if (result.body.isNotEmpty()) {
|
attachments = listOf(it)
|
||||||
result.preUploadResults.forEach {
|
)
|
||||||
SignalDatabase.attachments.updateAttachmentCaption(it.attachmentId, result.body)
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
MessageSender.sendPushWithPreUploadedMedia(
|
MessageSender.sendStories(
|
||||||
ApplicationDependencies.getApplication(),
|
ApplicationDependencies.getApplication(),
|
||||||
secureMessage,
|
secureMessages,
|
||||||
result.preUploadResults,
|
null,
|
||||||
threadId
|
|
||||||
) {
|
) {
|
||||||
Log.d(TAG, "Sent.")
|
Log.d(TAG, "Sent.")
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue