create conversation should work with frontend objectIds

This commit is contained in:
talksik
2022-06-11 09:00:49 -05:00
parent c98e564098
commit 4225a5a029
4 changed files with 78 additions and 13 deletions
+10 -4
View File
@@ -9,25 +9,31 @@ export default class Conversation {
* includes basic user info as well as their information
* for this particular conversation
*/
public members: (ConversationMember & User)[],
public members: ConversationUserMember[],
public name?: string,
public id: ObjectId = new ObjectId(),
/**
* last time there was new content for everyone
*/
public lastActivityDate = new Date(),
/**
* when name was changed or member list updated
* when the conversation document was created
*/
public lastUpdatedDate = new Date(),
public createdDate = new Date(),
public id: ObjectId = new ObjectId(),
/**
* when name was changed or member list updated
*/
public lastUpdatedDate?: Date,
) {}
}
export type ConversationUserMember = ConversationMember & User;
export class ConversationMember {
constructor(
public role: MemberRole,