Require TSContactThread for some messages
This commit is contained in:
parent
c2b6580481
commit
c30cc07b3c
@ -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,
|
||||
|
||||
@ -13,7 +13,7 @@ final class OutgoingStaticMessage: TransientOutgoingMessage {
|
||||
let plaintextData: Data
|
||||
|
||||
init(
|
||||
thread: TSThread,
|
||||
thread: TSContactThread,
|
||||
timestamp: UInt64,
|
||||
plaintextData: Data,
|
||||
tx: DBReadTransaction,
|
||||
|
||||
@ -12,7 +12,7 @@ public final class ProfileKeyMessage: TransientOutgoingMessage {
|
||||
let profileKey: ProfileKey?
|
||||
|
||||
public init(
|
||||
thread: TSThread,
|
||||
thread: TSContactThread,
|
||||
profileKey: ProfileKey,
|
||||
tx: DBReadTransaction,
|
||||
) {
|
||||
|
||||
@ -11,7 +11,7 @@ final class ReceiptMessage: TransientOutgoingMessage {
|
||||
private let receiptType: SSKProtoReceiptMessageType
|
||||
|
||||
init(
|
||||
thread: TSThread,
|
||||
thread: TSContactThread,
|
||||
receiptSet: MessageReceiptSet,
|
||||
receiptType: SSKProtoReceiptMessageType,
|
||||
tx: DBReadTransaction,
|
||||
|
||||
@ -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)
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user