|
|
|
@ -276,6 +276,8 @@ extension MessageReceiver {
|
|
|
|
|
) throws {
|
|
|
|
|
guard variant == .standardOutgoing else { return }
|
|
|
|
|
|
|
|
|
|
switch thread.variant {
|
|
|
|
|
case .contact:
|
|
|
|
|
if let syncTarget: String = syncTarget {
|
|
|
|
|
try RecipientState(
|
|
|
|
|
interactionId: interactionId,
|
|
|
|
@ -283,7 +285,8 @@ extension MessageReceiver {
|
|
|
|
|
state: .sent
|
|
|
|
|
).save(db)
|
|
|
|
|
}
|
|
|
|
|
else if thread.variant == .closedGroup {
|
|
|
|
|
|
|
|
|
|
case .closedGroup:
|
|
|
|
|
try GroupMember
|
|
|
|
|
.filter(GroupMember.Columns.groupId == thread.id)
|
|
|
|
|
.fetchAll(db)
|
|
|
|
@ -294,6 +297,13 @@ extension MessageReceiver {
|
|
|
|
|
state: .sent
|
|
|
|
|
).save(db)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
case .openGroup:
|
|
|
|
|
try RecipientState(
|
|
|
|
|
interactionId: interactionId,
|
|
|
|
|
recipientId: thread.id, // For open groups this will always be the thread id
|
|
|
|
|
state: .sent
|
|
|
|
|
).save(db)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// For outgoing messages mark all older interactions as read (the user should have seen
|
|
|
|
|