adding separate page for create a conversation
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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",
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user