|
|
|
@ -177,11 +177,21 @@ public final class SyncMessagesProtocol : NSObject {
|
|
|
|
|
thread.save(with: transaction)
|
|
|
|
|
// This takes into account multi device
|
|
|
|
|
messageSender.send(autoGeneratedFRMessage, success: {
|
|
|
|
|
autoGeneratedFRMessage.remove(with: transaction)
|
|
|
|
|
thread.isForceHidden = false
|
|
|
|
|
DispatchQueue.main.async {
|
|
|
|
|
storage.dbReadWriteConnection.readWrite { transaction in
|
|
|
|
|
autoGeneratedFRMessage.remove(with: transaction)
|
|
|
|
|
thread.isForceHidden = false
|
|
|
|
|
thread.save(with: transaction)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}, failure: { error in
|
|
|
|
|
autoGeneratedFRMessage.remove(with: transaction)
|
|
|
|
|
thread.isForceHidden = false
|
|
|
|
|
DispatchQueue.main.async {
|
|
|
|
|
storage.dbReadWriteConnection.readWrite { transaction in
|
|
|
|
|
autoGeneratedFRMessage.remove(with: transaction)
|
|
|
|
|
thread.isForceHidden = false
|
|
|
|
|
thread.save(with: transaction)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
case .requestReceived:
|
|
|
|
|
thread.saveFriendRequestStatus(.friends, with: transaction)
|
|
|
|
|