Browse Source

add default call iOS action if phone number was tapped

cyberta 4 years ago
parent
commit
b84e6ebab4
1 changed files with 3 additions and 0 deletions
  1. 3 0
      deltachat-ios/Chat/ChatViewController.swift

+ 3 - 0
deltachat-ios/Chat/ChatViewController.swift

@@ -1302,6 +1302,9 @@ extension ChatViewController: BaseMessageCellDelegate {
         if handleUIMenu() || handleSelection(indexPath: indexPath) {
             return
         }
+        if let phoneURL = URL(string: "tel://\(number)") {
+            UIApplication.shared.open(phoneURL, options: [:], completionHandler: nil)
+        }
         logger.debug("phone number tapped \(number)")
     }