Require TSContactThread for some messages

This commit is contained in:
Max Radermacher 2026-01-28 12:50:04 -06:00 committed by GitHub
parent c2b6580481
commit c30cc07b3c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 5 additions and 5 deletions

View File

@ -13,7 +13,7 @@ final class OutgoingEndSessionMessage: TransientOutgoingMessage {
super.init(coder: coder)
}
init(thread: TSThread, tx: DBReadTransaction) {
init(thread: TSContactThread, tx: DBReadTransaction) {
let messageBuilder = TSOutgoingMessageBuilder.outgoingMessageBuilder(thread: thread)
super.init(
outgoingMessageWith: messageBuilder,

View File

@ -13,7 +13,7 @@ final class OutgoingStaticMessage: TransientOutgoingMessage {
let plaintextData: Data
init(
thread: TSThread,
thread: TSContactThread,
timestamp: UInt64,
plaintextData: Data,
tx: DBReadTransaction,

View File

@ -12,7 +12,7 @@ public final class ProfileKeyMessage: TransientOutgoingMessage {
let profileKey: ProfileKey?
public init(
thread: TSThread,
thread: TSContactThread,
profileKey: ProfileKey,
tx: DBReadTransaction,
) {

View File

@ -11,7 +11,7 @@ final class ReceiptMessage: TransientOutgoingMessage {
private let receiptType: SSKProtoReceiptMessageType
init(
thread: TSThread,
thread: TSContactThread,
receiptSet: MessageReceiptSet,
receiptType: SSKProtoReceiptMessageType,
tx: DBReadTransaction,

View File

@ -160,7 +160,7 @@ public class OutgoingMessageFactory: Factory {
// MARK: Dependent Factories
public var threadCreator: (DBWriteTransaction) -> TSThread = { transaction in
public var threadCreator: (DBWriteTransaction) -> TSContactThread = { transaction in
ContactThreadFactory().create(transaction: transaction)
}