@armi-wave/common 1.23.38 → 1.23.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -62,6 +62,15 @@ const conversationSchema = new mongoose_1.Schema({
|
|
|
62
62
|
of: Number,
|
|
63
63
|
default: {},
|
|
64
64
|
},
|
|
65
|
+
groupName: {
|
|
66
|
+
type: String,
|
|
67
|
+
required: false,
|
|
68
|
+
trim: true,
|
|
69
|
+
},
|
|
70
|
+
groupImageUrl: {
|
|
71
|
+
type: String,
|
|
72
|
+
required: false,
|
|
73
|
+
},
|
|
65
74
|
}, {
|
|
66
75
|
timestamps: true,
|
|
67
76
|
toJSON: {
|
|
@@ -5,16 +5,13 @@ export interface SharedPost {
|
|
|
5
5
|
postId: mongoose.Types.ObjectId;
|
|
6
6
|
postModel: 'Post' | 'TextPost' | 'VideoPost';
|
|
7
7
|
postType: string;
|
|
8
|
-
contentUrl?: string;
|
|
9
|
-
caption: string;
|
|
10
|
-
username: string;
|
|
11
|
-
profilePicUrl: string;
|
|
12
8
|
}
|
|
13
9
|
interface Message extends Document {
|
|
14
10
|
conversationId: mongoose.Types.ObjectId;
|
|
15
11
|
senderId: mongoose.Types.ObjectId;
|
|
16
12
|
content: string;
|
|
17
13
|
type: MessageType;
|
|
14
|
+
contentUrls?: string[];
|
|
18
15
|
status: MessageStatus;
|
|
19
16
|
readBy: mongoose.Types.ObjectId[];
|
|
20
17
|
deletedFor: mongoose.Types.ObjectId[];
|
|
@@ -53,6 +53,7 @@ const messageSchema = new mongoose_1.Schema({
|
|
|
53
53
|
type: String,
|
|
54
54
|
required: true,
|
|
55
55
|
trim: true,
|
|
56
|
+
default: '', // Can be empty if just sending media
|
|
56
57
|
},
|
|
57
58
|
type: {
|
|
58
59
|
type: String,
|
|
@@ -60,6 +61,10 @@ const messageSchema = new mongoose_1.Schema({
|
|
|
60
61
|
required: true,
|
|
61
62
|
default: MessageType_1.MessageType.Text,
|
|
62
63
|
},
|
|
64
|
+
contentUrls: {
|
|
65
|
+
type: [String],
|
|
66
|
+
default: [],
|
|
67
|
+
},
|
|
63
68
|
status: {
|
|
64
69
|
type: String,
|
|
65
70
|
enum: Object.values(MessageStatus_1.MessageStatus),
|
|
@@ -78,19 +83,17 @@ const messageSchema = new mongoose_1.Schema({
|
|
|
78
83
|
postId: {
|
|
79
84
|
type: mongoose_1.Schema.Types.ObjectId,
|
|
80
85
|
required: false,
|
|
81
|
-
// Dynamic ref - determined by postModel field
|
|
82
86
|
refPath: 'sharedPost.postModel',
|
|
83
87
|
},
|
|
84
88
|
postModel: {
|
|
85
89
|
type: String,
|
|
86
90
|
required: false,
|
|
87
|
-
enum: ['Post', 'TextPost', 'VideoPost'],
|
|
91
|
+
enum: ['Post', 'TextPost', 'VideoPost'],
|
|
92
|
+
},
|
|
93
|
+
postType: {
|
|
94
|
+
type: String,
|
|
95
|
+
required: false,
|
|
88
96
|
},
|
|
89
|
-
postType: { type: String, required: false }, // image/video/text
|
|
90
|
-
contentUrl: { type: String, required: false },
|
|
91
|
-
caption: { type: String, required: false, default: '' },
|
|
92
|
-
username: { type: String, required: false },
|
|
93
|
-
profilePicUrl: { type: String, required: false, default: '' },
|
|
94
97
|
},
|
|
95
98
|
}, {
|
|
96
99
|
timestamps: true,
|