pull/731/head
Ryan ZHAO 3 months ago
parent ce1eee2018
commit 4cf739eeef

@ -39,7 +39,6 @@ public class Message: Codable {
receivedTimestamp: UInt64? = nil,
recipient: String? = nil,
sender: String? = nil,
groupPublicKey: String? = nil,
openGroupServerMessageId: UInt64? = nil,
serverHash: String? = nil,
expiresInSeconds: TimeInterval? = nil,

@ -47,7 +47,6 @@ public final class VisibleMessage: Message {
sender: String? = nil,
sentTimestamp: UInt64? = nil,
recipient: String? = nil,
groupPublicKey: String? = nil,
syncTarget: String? = nil,
text: String?,
attachmentIds: [String] = [],
@ -69,8 +68,7 @@ public final class VisibleMessage: Message {
super.init(
sentTimestamp: sentTimestamp,
recipient: recipient,
sender: sender,
groupPublicKey: groupPublicKey
sender: sender
)
}
@ -229,14 +227,6 @@ public extension VisibleMessage {
sender: interaction.authorId,
sentTimestamp: UInt64(interaction.timestampMs),
recipient: (try? interaction.recipientStates.fetchOne(db))?.recipientId,
groupPublicKey: try? interaction.thread
.filter(
SessionThread.Columns.variant == SessionThread.Variant.legacyGroup ||
SessionThread.Columns.variant == SessionThread.Variant.group
)
.select(.id)
.asRequest(of: String.self)
.fetchOne(db),
syncTarget: nil,
text: interaction.body,
attachmentIds: ((try? interaction.attachments.fetchAll(db)) ?? [])

Loading…
Cancel
Save