diff --git a/Skip.env b/Skip.env index 447625a..119dc73 100644 --- a/Skip.env +++ b/Skip.env @@ -11,7 +11,7 @@ PRODUCT_NAME = FireSide PRODUCT_BUNDLE_IDENTIFIER = skip.fireside.App // The semantic version of the app -MARKETING_VERSION = 0.0.1 +MARKETING_VERSION = 0.0.2 // The build number specifying the internal app version CURRENT_PROJECT_VERSION = 1 diff --git a/Sources/FireSideModel/FireSideModel.swift b/Sources/FireSideModel/FireSideModel.swift index 3a41123..5594319 100644 --- a/Sources/FireSideModel/FireSideModel.swift +++ b/Sources/FireSideModel/FireSideModel.swift @@ -55,7 +55,22 @@ public actor FireSideStore { @MainActor public func startNewChat() async throws -> String { logger.info("startNewChat") - return "12345678" + + let cref = firestore.collection("messages") + let snapshot = try await cref.getDocuments() + logger.log("cref document: \(snapshot)") + for document in snapshot.documents { + logger.log("read cref: \(document.documentID) => \(document.data())") + } + + let dref = try await cref.addDocument(data: [ + "m": "some message", + "t": Date.now.timeIntervalSince1970, + ]) + + logger.log("created document: \(dref.documentID)") + + return dref.documentID } @MainActor public func runTask() async throws {