adding separate page for create a conversation

This commit is contained in:
Arjun Patel
2022-01-31 17:23:39 -08:00
parent f4eef9c3d0
commit 6a4b353024
7 changed files with 78 additions and 21 deletions
+1 -1
View File
@@ -3,7 +3,7 @@ enum Routes {
later = "/s#later",
done = "/s#done",
drawer = "/s#drawer",
rooms = "/s#rooms",
createConvo = "/s#createConversation",
}
export default Routes;
@@ -5,6 +5,7 @@ export default class ConversationData {
// if user wants more data, click button to fetch further back
// see if this convo is a priority one
// all users in the conversation: userId's perhaps, but the actual user we can get from the relevantUsersCache map
// want to create individual convo chunks...if I send three messages in a row, it should show my name and only one click to listen to all three in order
}
// one map: all relevant users, a map we build based on where the user visits
+12 -1
View File
@@ -4,13 +4,24 @@ import { Timestamp } from "firebase/firestore";
export default class Conversation {
id: string = uuid();
type: ConversationType;
name: string; // engineering, general, arjun and jacob...
createdDate: Timestamp = Timestamp.now();
createdByUserId: string;
constructor(_name: string, _createdByUserId: string) {
constructor(
_name: string,
_createdByUserId: string,
_type: ConversationType
) {
this.name = _name;
this.createdByUserId = _createdByUserId;
this.type = _type;
}
}
export enum ConversationType {
personal = "personal",
group = "group",
}