Disable data extraction notifications for now

pull/362/head
Niels Andriesse 4 years ago
parent b21163a421
commit 52eaa8cdeb

@ -657,21 +657,27 @@ extension ConversationVC : InputViewDelegate, MessageCellDelegate, ContextMenuAc
// MARK: Data Extraction Notifications
@objc func sendScreenshotNotificationIfNeeded() {
// Disabled until other platforms implement it as well
/*
guard thread is TSContactThread else { return }
let message = DataExtractionNotification()
message.kind = .screenshot
Storage.write { transaction in
MessageSender.send(message, in: self.thread, using: transaction)
}
*/
}
func sendMediaSavedNotificationIfNeeded(with timestamp: UInt64) {
// Disabled until other platforms implement it as well
/*
guard thread is TSContactThread else { return }
let message = DataExtractionNotification()
message.kind = .mediaSaved(timestamp: timestamp)
Storage.write { transaction in
MessageSender.send(message, in: self.thread, using: transaction)
}
*/
}
// MARK: Requesting Permission

@ -110,7 +110,7 @@ extension MessageReceiver {
private static func handleDataExtractionNotification(_ message: DataExtractionNotification, using transaction: Any) {
let transaction = transaction as! YapDatabaseReadWriteTransaction
guard message.groupPublicKey == nil,
let thread = TSContactThread.getWithContactId(message.sender!, transaction: transaction) else { return }
let thread = TSContactThread.getWithContactId(message.sender!, transaction: transaction), case .screenshot = message.kind else { return }
let type: TSInfoMessageType
switch message.kind! {
case .screenshot: type = .screenshotNotification

Loading…
Cancel
Save