@studious-lms/server 1.1.9 → 1.1.11

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.
package/dist/index.js CHANGED
@@ -18,6 +18,8 @@ app.use(cors({
18
18
  'http://localhost:3001', // Server port
19
19
  'http://127.0.0.1:3000', // Alternative localhost
20
20
  'http://127.0.0.1:3001', // Alternative localhost
21
+ 'https://www.studious.sh', // Production frontend
22
+ 'https://studious.sh', // Production frontend (without www)
21
23
  process.env.NEXT_PUBLIC_APP_URL || 'http://localhost:3000'
22
24
  ],
23
25
  credentials: true,
@@ -32,6 +34,8 @@ app.options('*', (req, res) => {
32
34
  'http://localhost:3001',
33
35
  'http://127.0.0.1:3000',
34
36
  'http://127.0.0.1:3001',
37
+ 'https://www.studious.sh', // Production frontend
38
+ 'https://studious.sh', // Production frontend (without www)
35
39
  process.env.NEXT_PUBLIC_APP_URL || 'http://localhost:3000'
36
40
  ];
37
41
  const origin = req.headers.origin;
@@ -82,6 +86,8 @@ const io = new Server(httpServer, {
82
86
  'http://localhost:3001', // Server port
83
87
  'http://127.0.0.1:3000', // Alternative localhost
84
88
  'http://127.0.0.1:3001', // Alternative localhost
89
+ 'https://www.studious.sh', // Production frontend
90
+ 'https://studious.sh', // Production frontend (without www)
85
91
  process.env.NEXT_PUBLIC_APP_URL || 'http://localhost:3000'
86
92
  ],
87
93
  methods: ['GET', 'POST', 'PUT', 'DELETE', 'OPTIONS'],
@@ -137,6 +143,68 @@ app.get('/api/files/:filePath', async (req, res) => {
137
143
  res.status(500).json({ error: 'Internal server error' });
138
144
  }
139
145
  });
146
+ // File upload endpoint for secure file uploads (supports both POST and PUT)
147
+ app.post('/api/upload/:filePath', async (req, res) => {
148
+ handleFileUpload(req, res);
149
+ });
150
+ app.put('/api/upload/:filePath', async (req, res) => {
151
+ handleFileUpload(req, res);
152
+ });
153
+ function handleFileUpload(req, res) {
154
+ try {
155
+ const filePath = decodeURIComponent(req.params.filePath);
156
+ console.log('File upload request:', { filePath, originalPath: req.params.filePath, method: req.method });
157
+ // Set CORS headers for upload endpoint
158
+ const origin = req.headers.origin;
159
+ const allowedOrigins = [
160
+ 'http://localhost:3000',
161
+ 'http://localhost:3001',
162
+ 'http://127.0.0.1:3000',
163
+ 'http://127.0.0.1:3001',
164
+ 'https://www.studious.sh', // Production frontend
165
+ 'https://studious.sh', // Production frontend (without www)
166
+ process.env.NEXT_PUBLIC_APP_URL || 'http://localhost:3000'
167
+ ];
168
+ if (origin && allowedOrigins.includes(origin)) {
169
+ res.header('Access-Control-Allow-Origin', origin);
170
+ }
171
+ else {
172
+ res.header('Access-Control-Allow-Origin', 'http://localhost:3000');
173
+ }
174
+ res.header('Access-Control-Allow-Credentials', 'true');
175
+ // Get content type from headers
176
+ const contentType = req.headers['content-type'] || 'application/octet-stream';
177
+ // Create a new file in the bucket
178
+ const file = bucket.file(filePath);
179
+ // Create a write stream to Google Cloud Storage
180
+ const writeStream = file.createWriteStream({
181
+ metadata: {
182
+ contentType,
183
+ },
184
+ });
185
+ // Handle stream events
186
+ writeStream.on('error', (error) => {
187
+ console.error('Error uploading file:', error);
188
+ if (!res.headersSent) {
189
+ res.status(500).json({ error: 'Error uploading file' });
190
+ }
191
+ });
192
+ writeStream.on('finish', () => {
193
+ console.log('File uploaded successfully:', filePath);
194
+ res.status(200).json({
195
+ success: true,
196
+ filePath,
197
+ message: 'File uploaded successfully'
198
+ });
199
+ });
200
+ // Pipe the request body to the write stream
201
+ req.pipe(writeStream);
202
+ }
203
+ catch (error) {
204
+ console.error('Error handling file upload:', error);
205
+ res.status(500).json({ error: 'Internal server error' });
206
+ }
207
+ }
140
208
  // Create caller
141
209
  const createCaller = createCallerFactory(appRouter);
142
210
  // Setup tRPC middleware
@@ -131,12 +131,22 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
131
131
  teacher: {
132
132
  id: string;
133
133
  username: string;
134
+ profile: {
135
+ displayName: string | null;
136
+ profilePicture: string | null;
137
+ profilePictureThumbnail: string | null;
138
+ } | null;
134
139
  };
135
140
  createdAt: Date;
136
141
  }[];
137
142
  students: {
138
143
  id: string;
139
144
  username: string;
145
+ profile: {
146
+ displayName: string | null;
147
+ profilePicture: string | null;
148
+ profilePictureThumbnail: string | null;
149
+ } | null;
140
150
  }[];
141
151
  teachers: {
142
152
  id: string;
@@ -1557,6 +1567,11 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
1557
1567
  student: {
1558
1568
  id: string;
1559
1569
  username: string;
1570
+ profile: {
1571
+ displayName: string | null;
1572
+ profilePicture: string | null;
1573
+ profilePictureThumbnail: string | null;
1574
+ } | null;
1560
1575
  };
1561
1576
  attachments: ({
1562
1577
  thumbnail: {
@@ -1670,6 +1685,11 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
1670
1685
  student: {
1671
1686
  id: string;
1672
1687
  username: string;
1688
+ profile: {
1689
+ displayName: string | null;
1690
+ profilePicture: string | null;
1691
+ profilePictureThumbnail: string | null;
1692
+ } | null;
1673
1693
  };
1674
1694
  attachments: {
1675
1695
  path: string;
@@ -2335,14 +2355,29 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
2335
2355
  late: {
2336
2356
  id: string;
2337
2357
  username: string;
2358
+ profile: {
2359
+ displayName: string | null;
2360
+ profilePicture: string | null;
2361
+ profilePictureThumbnail: string | null;
2362
+ } | null;
2338
2363
  }[];
2339
2364
  present: {
2340
2365
  id: string;
2341
2366
  username: string;
2367
+ profile: {
2368
+ displayName: string | null;
2369
+ profilePicture: string | null;
2370
+ profilePictureThumbnail: string | null;
2371
+ } | null;
2342
2372
  }[];
2343
2373
  absent: {
2344
2374
  id: string;
2345
2375
  username: string;
2376
+ profile: {
2377
+ displayName: string | null;
2378
+ profilePicture: string | null;
2379
+ profilePictureThumbnail: string | null;
2380
+ } | null;
2346
2381
  }[];
2347
2382
  } & {
2348
2383
  id: string;
@@ -3548,6 +3583,40 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
3548
3583
  };
3549
3584
  meta: object;
3550
3585
  }>;
3586
+ update: import("@trpc/server").TRPCMutationProcedure<{
3587
+ input: {
3588
+ content: string;
3589
+ messageId: string;
3590
+ mentionedUserIds?: string[] | undefined;
3591
+ };
3592
+ output: {
3593
+ id: string;
3594
+ content: string;
3595
+ senderId: string;
3596
+ conversationId: string;
3597
+ createdAt: Date;
3598
+ sender: {
3599
+ id: string;
3600
+ username: string;
3601
+ profile: {
3602
+ displayName: string | null;
3603
+ profilePicture: string | null;
3604
+ } | null;
3605
+ };
3606
+ mentionedUserIds: string[];
3607
+ };
3608
+ meta: object;
3609
+ }>;
3610
+ delete: import("@trpc/server").TRPCMutationProcedure<{
3611
+ input: {
3612
+ messageId: string;
3613
+ };
3614
+ output: {
3615
+ success: boolean;
3616
+ messageId: string;
3617
+ };
3618
+ meta: object;
3619
+ }>;
3551
3620
  markAsRead: import("@trpc/server").TRPCMutationProcedure<{
3552
3621
  input: {
3553
3622
  conversationId: string;
@@ -3713,12 +3782,22 @@ export declare const createCaller: import("@trpc/server").TRPCRouterCaller<{
3713
3782
  teacher: {
3714
3783
  id: string;
3715
3784
  username: string;
3785
+ profile: {
3786
+ displayName: string | null;
3787
+ profilePicture: string | null;
3788
+ profilePictureThumbnail: string | null;
3789
+ } | null;
3716
3790
  };
3717
3791
  createdAt: Date;
3718
3792
  }[];
3719
3793
  students: {
3720
3794
  id: string;
3721
3795
  username: string;
3796
+ profile: {
3797
+ displayName: string | null;
3798
+ profilePicture: string | null;
3799
+ profilePictureThumbnail: string | null;
3800
+ } | null;
3722
3801
  }[];
3723
3802
  teachers: {
3724
3803
  id: string;
@@ -5139,6 +5218,11 @@ export declare const createCaller: import("@trpc/server").TRPCRouterCaller<{
5139
5218
  student: {
5140
5219
  id: string;
5141
5220
  username: string;
5221
+ profile: {
5222
+ displayName: string | null;
5223
+ profilePicture: string | null;
5224
+ profilePictureThumbnail: string | null;
5225
+ } | null;
5142
5226
  };
5143
5227
  attachments: ({
5144
5228
  thumbnail: {
@@ -5252,6 +5336,11 @@ export declare const createCaller: import("@trpc/server").TRPCRouterCaller<{
5252
5336
  student: {
5253
5337
  id: string;
5254
5338
  username: string;
5339
+ profile: {
5340
+ displayName: string | null;
5341
+ profilePicture: string | null;
5342
+ profilePictureThumbnail: string | null;
5343
+ } | null;
5255
5344
  };
5256
5345
  attachments: {
5257
5346
  path: string;
@@ -5917,14 +6006,29 @@ export declare const createCaller: import("@trpc/server").TRPCRouterCaller<{
5917
6006
  late: {
5918
6007
  id: string;
5919
6008
  username: string;
6009
+ profile: {
6010
+ displayName: string | null;
6011
+ profilePicture: string | null;
6012
+ profilePictureThumbnail: string | null;
6013
+ } | null;
5920
6014
  }[];
5921
6015
  present: {
5922
6016
  id: string;
5923
6017
  username: string;
6018
+ profile: {
6019
+ displayName: string | null;
6020
+ profilePicture: string | null;
6021
+ profilePictureThumbnail: string | null;
6022
+ } | null;
5924
6023
  }[];
5925
6024
  absent: {
5926
6025
  id: string;
5927
6026
  username: string;
6027
+ profile: {
6028
+ displayName: string | null;
6029
+ profilePicture: string | null;
6030
+ profilePictureThumbnail: string | null;
6031
+ } | null;
5928
6032
  }[];
5929
6033
  } & {
5930
6034
  id: string;
@@ -7130,6 +7234,40 @@ export declare const createCaller: import("@trpc/server").TRPCRouterCaller<{
7130
7234
  };
7131
7235
  meta: object;
7132
7236
  }>;
7237
+ update: import("@trpc/server").TRPCMutationProcedure<{
7238
+ input: {
7239
+ content: string;
7240
+ messageId: string;
7241
+ mentionedUserIds?: string[] | undefined;
7242
+ };
7243
+ output: {
7244
+ id: string;
7245
+ content: string;
7246
+ senderId: string;
7247
+ conversationId: string;
7248
+ createdAt: Date;
7249
+ sender: {
7250
+ id: string;
7251
+ username: string;
7252
+ profile: {
7253
+ displayName: string | null;
7254
+ profilePicture: string | null;
7255
+ } | null;
7256
+ };
7257
+ mentionedUserIds: string[];
7258
+ };
7259
+ meta: object;
7260
+ }>;
7261
+ delete: import("@trpc/server").TRPCMutationProcedure<{
7262
+ input: {
7263
+ messageId: string;
7264
+ };
7265
+ output: {
7266
+ success: boolean;
7267
+ messageId: string;
7268
+ };
7269
+ meta: object;
7270
+ }>;
7133
7271
  markAsRead: import("@trpc/server").TRPCMutationProcedure<{
7134
7272
  input: {
7135
7273
  conversationId: string;
@@ -1 +1 @@
1
- {"version":3,"file":"_app.d.ts","sourceRoot":"","sources":["../../src/routers/_app.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAY1E,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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
722
+ profile: {
723
+ displayName: string | null;
724
+ profilePicture: string | null;
725
+ profilePictureThumbnail: string | null;
726
+ } | null;
722
727
  };
723
728
  attachments: ({
724
729
  thumbnail: {
@@ -832,6 +837,11 @@ export declare const assignmentRouter: import("@trpc/server").TRPCBuiltRouter<{
832
837
  student: {
833
838
  id: string;
834
839
  username: string;
840
+ profile: {
841
+ displayName: string | null;
842
+ profilePicture: string | null;
843
+ profilePictureThumbnail: string | null;
844
+ } | null;
835
845
  };
836
846
  attachments: {
837
847
  path: string;
@@ -1 +1 @@
1
- {"version":3,"file":"assignment.d.ts","sourceRoot":"","sources":["../../src/routers/assignment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAsFxB,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+rD3B,CAAC"}
@@ -1003,6 +1003,13 @@ export const assignmentRouter = createTRPCRouter({
1003
1003
  select: {
1004
1004
  id: true,
1005
1005
  username: true,
1006
+ profile: {
1007
+ select: {
1008
+ displayName: true,
1009
+ profilePicture: true,
1010
+ profilePictureThumbnail: true,
1011
+ },
1012
+ },
1006
1013
  },
1007
1014
  },
1008
1015
  assignment: {
@@ -1099,6 +1106,13 @@ export const assignmentRouter = createTRPCRouter({
1099
1106
  select: {
1100
1107
  id: true,
1101
1108
  username: true,
1109
+ profile: {
1110
+ select: {
1111
+ displayName: true,
1112
+ profilePicture: true,
1113
+ profilePictureThumbnail: true,
1114
+ },
1115
+ },
1102
1116
  },
1103
1117
  },
1104
1118
  assignment: {
@@ -1207,6 +1221,13 @@ export const assignmentRouter = createTRPCRouter({
1207
1221
  select: {
1208
1222
  id: true,
1209
1223
  username: true,
1224
+ profile: {
1225
+ select: {
1226
+ displayName: true,
1227
+ profilePicture: true,
1228
+ profilePictureThumbnail: true,
1229
+ },
1230
+ },
1210
1231
  },
1211
1232
  },
1212
1233
  assignment: {
@@ -33,14 +33,29 @@ export declare const attendanceRouter: import("@trpc/server").TRPCBuiltRouter<{
33
33
  late: {
34
34
  id: string;
35
35
  username: string;
36
+ profile: {
37
+ displayName: string | null;
38
+ profilePicture: string | null;
39
+ profilePictureThumbnail: string | null;
40
+ } | null;
36
41
  }[];
37
42
  present: {
38
43
  id: string;
39
44
  username: string;
45
+ profile: {
46
+ displayName: string | null;
47
+ profilePicture: string | null;
48
+ profilePictureThumbnail: string | null;
49
+ } | null;
40
50
  }[];
41
51
  absent: {
42
52
  id: string;
43
53
  username: string;
54
+ profile: {
55
+ displayName: string | null;
56
+ profilePicture: string | null;
57
+ profilePictureThumbnail: string | null;
58
+ } | null;
44
59
  }[];
45
60
  } & {
46
61
  id: string;
@@ -1 +1 @@
1
- {"version":3,"file":"attendance.d.ts","sourceRoot":"","sources":["../../src/routers/attendance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAYxB,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+Q3B,CAAC"}
1
+ {"version":3,"file":"attendance.d.ts","sourceRoot":"","sources":["../../src/routers/attendance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAYxB,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+S3B,CAAC"}
@@ -46,6 +46,17 @@ export const attendanceRouter = createTRPCRouter({
46
46
  students: {
47
47
  select: {
48
48
  id: true,
49
+ username: true,
50
+ profile: {
51
+ select: {
52
+ displayName: true,
53
+ profilePicture: true,
54
+ profilePictureThumbnail: true,
55
+ bio: true,
56
+ location: true,
57
+ website: true,
58
+ },
59
+ },
49
60
  },
50
61
  },
51
62
  },
@@ -108,18 +119,39 @@ export const attendanceRouter = createTRPCRouter({
108
119
  select: {
109
120
  id: true,
110
121
  username: true,
122
+ profile: {
123
+ select: {
124
+ displayName: true,
125
+ profilePicture: true,
126
+ profilePictureThumbnail: true,
127
+ },
128
+ },
111
129
  },
112
130
  },
113
131
  late: {
114
132
  select: {
115
133
  id: true,
116
134
  username: true,
135
+ profile: {
136
+ select: {
137
+ displayName: true,
138
+ profilePicture: true,
139
+ profilePictureThumbnail: true,
140
+ },
141
+ },
117
142
  },
118
143
  },
119
144
  absent: {
120
145
  select: {
121
146
  id: true,
122
147
  username: true,
148
+ profile: {
149
+ select: {
150
+ displayName: true,
151
+ profilePicture: true,
152
+ profilePictureThumbnail: true,
153
+ },
154
+ },
123
155
  },
124
156
  },
125
157
  },
@@ -114,12 +114,22 @@ export declare const classRouter: import("@trpc/server").TRPCBuiltRouter<{
114
114
  teacher: {
115
115
  id: string;
116
116
  username: string;
117
+ profile: {
118
+ displayName: string | null;
119
+ profilePicture: string | null;
120
+ profilePictureThumbnail: string | null;
121
+ } | null;
117
122
  };
118
123
  createdAt: Date;
119
124
  }[];
120
125
  students: {
121
126
  id: string;
122
127
  username: string;
128
+ profile: {
129
+ displayName: string | null;
130
+ profilePicture: string | null;
131
+ profilePictureThumbnail: string | null;
132
+ } | null;
123
133
  }[];
124
134
  teachers: {
125
135
  id: string;
@@ -1 +1 @@
1
- {"version":3,"file":"class.d.ts","sourceRoot":"","sources":["../../src/routers/class.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwjCtB,CAAC"}
@@ -100,6 +100,13 @@ export const classRouter = createTRPCRouter({
100
100
  select: {
101
101
  id: true,
102
102
  username: true,
103
+ profile: {
104
+ select: {
105
+ displayName: true,
106
+ profilePicture: true,
107
+ profilePictureThumbnail: true,
108
+ },
109
+ },
103
110
  },
104
111
  },
105
112
  announcements: {
@@ -114,6 +121,13 @@ export const classRouter = createTRPCRouter({
114
121
  select: {
115
122
  id: true,
116
123
  username: true,
124
+ profile: {
125
+ select: {
126
+ displayName: true,
127
+ profilePicture: true,
128
+ profilePictureThumbnail: true,
129
+ },
130
+ },
117
131
  },
118
132
  },
119
133
  },
@@ -1 +1 @@
1
- {"version":3,"file":"conversation.d.ts","sourceRoot":"","sources":["../../src/routers/conversation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuR7B,CAAC"}
1
+ {"version":3,"file":"conversation.d.ts","sourceRoot":"","sources":["../../src/routers/conversation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8R7B,CAAC"}
@@ -70,14 +70,19 @@ export const conversationRouter = createTRPCRouter({
70
70
  },
71
71
  });
72
72
  // Count unread mentions
73
+ // Use the later of lastViewedAt or lastViewedMentionAt
74
+ // This means if user viewed conversation after mention, mention is considered read
75
+ const mentionCutoffTime = lastViewedMentionAt && lastViewedAt
76
+ ? (lastViewedMentionAt > lastViewedAt ? lastViewedMentionAt : lastViewedAt)
77
+ : (lastViewedMentionAt || lastViewedAt);
73
78
  const unreadMentionCount = await prisma.mention.count({
74
79
  where: {
75
80
  userId,
76
81
  message: {
77
82
  conversationId: conversation.id,
78
83
  senderId: { not: userId },
79
- ...(lastViewedMentionAt && {
80
- createdAt: { gt: lastViewedMentionAt }
84
+ ...(mentionCutoffTime && {
85
+ createdAt: { gt: mentionCutoffTime }
81
86
  }),
82
87
  },
83
88
  },
@@ -164,12 +169,13 @@ export const conversationRouter = createTRPCRouter({
164
169
  // Verify all members exist
165
170
  const members = await prisma.user.findMany({
166
171
  where: {
167
- id: {
172
+ username: {
168
173
  in: memberIds,
169
174
  },
170
175
  },
171
176
  select: {
172
177
  id: true,
178
+ username: true,
173
179
  },
174
180
  });
175
181
  if (members.length !== memberIds.length) {
@@ -190,7 +196,7 @@ export const conversationRouter = createTRPCRouter({
190
196
  role: type === 'GROUP' ? 'ADMIN' : 'MEMBER',
191
197
  },
192
198
  ...memberIds.map((memberId) => ({
193
- userId: memberId,
199
+ userId: members.find((member) => member.username === memberId).id,
194
200
  role: 'MEMBER',
195
201
  })),
196
202
  ],