add trigger for archive

This commit is contained in:
SMARSHCORP\Shilo Regev 2024-04-09 23:44:09 +03:00
parent 9ca3fed4aa
commit f65d15b777
2 changed files with 6 additions and 1 deletions

View file

@ -634,7 +634,7 @@ open class AttachmentTable( //TM_SA make class open
* that the content of the attachment will never change.
*/
@Throws(MmsException::class)
fun finalizeAttachmentAfterDownload(mmsId: Long, attachmentId: AttachmentId, inputStream: InputStream) {
open fun finalizeAttachmentAfterDownload(mmsId: Long, attachmentId: AttachmentId, inputStream: InputStream) { //TM_SA make fun open
Log.i(TAG, "[finalizeAttachmentAfterDownload] Finalizing downloaded data for $attachmentId. (MessageId: $mmsId, $attachmentId)")
val existingPlaceholder: DatabaseAttachment = getAttachment(attachmentId) ?: throw MmsException("No attachment found for id: $attachmentId")

View file

@ -44,4 +44,9 @@ class TeleAttachmentTable(
super.markAttachmentUploaded(messageId, attachment)
messageStoreObserver.afterMessageIdStateChanged(messageId)
}
override fun finalizeAttachmentAfterDownload(mmsId: Long, attachmentId: AttachmentId, inputStream: InputStream) {
super.finalizeAttachmentAfterDownload(mmsId, attachmentId, inputStream)
messageStoreObserver.afterMessageIdStateChanged(mmsId)
}
}