messaging works...hell ya
This commit is contained in:
@@ -150,9 +150,9 @@ class FirestoreService {
|
||||
do {
|
||||
let _ = try db.collection(Collection.messages.rawValue).addDocument(from: message)
|
||||
|
||||
completion(ServiceState.success("user created"))
|
||||
completion(ServiceState.success("message created"))
|
||||
} catch {
|
||||
print("error in updating user \(error.localizedDescription)")
|
||||
print("error in creating message \(error.localizedDescription)")
|
||||
completion(ServiceState.error(ServiceError(description: error.localizedDescription)))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,13 +73,13 @@ class InnerCircleViewModel: ObservableObject {
|
||||
// create a new message in firestore with the url for receiving user to automatically get notified
|
||||
self?.firestoreService.createMessage(message: newMessage) {[weak self] res in
|
||||
print(res)
|
||||
|
||||
// delete local audio file from user's phone so that it doesn't get crazy
|
||||
print("stopped recording: file about to get deleted from \(self?.getTemporaryDirectory()) with filename: \(self?.audioLocalUrl)")
|
||||
|
||||
try? FileManager.default.removeItem(at: (self?.audioLocalUrl)!)
|
||||
}
|
||||
}
|
||||
|
||||
// delete local audio file from user's phone so that it doesn't get crazy
|
||||
print("stopped recording: file about to get deleted from \(getTemporaryDirectory()) with filename: \(self.audioLocalUrl)")
|
||||
|
||||
try? FileManager.default.removeItem(at: self.audioLocalUrl!)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user