db.collection("rooms").doc(channelId).collection("messages").add({ message: input, timestamp: serverTimestamp(), user: 'Apollos', userImage: 'https://naniwallpaper.com/files/wallpapers/eren-yeager/1-EREN%20YEAGER-1080x1920.jpg' });¿Cómo debería ser esto en firestore v9?
import { doc } from "firebase/firestore"; const messageRef = doc(db, "rooms", chanelID, "messages"); const update = { message: input, timestamp: serverTimestamp(), user: 'Apollos', userImage: 'https://naniwallpaper.com/files/wallpapers/eren-yeager/1-EREN%20YEAGER-1080x1920.jpg' } setDoc(messageRef, update, { merge: true });