aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video/video-comment.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-10-15 16:43:14 +0200
committerChocobozzz <me@florianbigard.com>2018-10-16 16:41:36 +0200
commit65b21c961c69c4a63c7c0c34be3d6d034a1176c7 (patch)
tree35ec4a16c90a1de99b2865fbabb368b683ca6c87 /server/models/video/video-comment.ts
parentb44164bb567fe7c9f65f1ac2908d44990a8ccc8e (diff)
downloadPeerTube-65b21c961c69c4a63c7c0c34be3d6d034a1176c7.tar.gz
PeerTube-65b21c961c69c4a63c7c0c34be3d6d034a1176c7.tar.zst
PeerTube-65b21c961c69c4a63c7c0c34be3d6d034a1176c7.zip
Add ability to mute a user/instance by server in client
Diffstat (limited to 'server/models/video/video-comment.ts')
-rw-r--r--server/models/video/video-comment.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/models/video/video-comment.ts b/server/models/video/video-comment.ts
index 08c6b3ff0..dd6d08139 100644
--- a/server/models/video/video-comment.ts
+++ b/server/models/video/video-comment.ts
@@ -294,7 +294,7 @@ export class VideoCommentModel extends Model<VideoCommentModel> {
294 static async listThreadsForApi (videoId: number, start: number, count: number, sort: string, user?: UserModel) { 294 static async listThreadsForApi (videoId: number, start: number, count: number, sort: string, user?: UserModel) {
295 const serverActor = await getServerActor() 295 const serverActor = await getServerActor()
296 const serverAccountId = serverActor.Account.id 296 const serverAccountId = serverActor.Account.id
297 const userAccountId = user.Account.id 297 const userAccountId = user ? user.Account.id : undefined
298 298
299 const query = { 299 const query = {
300 offset: start, 300 offset: start,
@@ -330,7 +330,7 @@ export class VideoCommentModel extends Model<VideoCommentModel> {
330 static async listThreadCommentsForApi (videoId: number, threadId: number, user?: UserModel) { 330 static async listThreadCommentsForApi (videoId: number, threadId: number, user?: UserModel) {
331 const serverActor = await getServerActor() 331 const serverActor = await getServerActor()
332 const serverAccountId = serverActor.Account.id 332 const serverAccountId = serverActor.Account.id
333 const userAccountId = user.Account.id 333 const userAccountId = user ? user.Account.id : undefined
334 334
335 const query = { 335 const query = {
336 order: [ [ 'createdAt', 'ASC' ], [ 'updatedAt', 'ASC' ] ], 336 order: [ [ 'createdAt', 'ASC' ], [ 'updatedAt', 'ASC' ] ],