1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-03 09:49:20 +02:00

Better live notification label

This commit is contained in:
Chocobozzz 2025-01-16 10:47:45 +01:00
parent d5c4cc2b44
commit 82246a0c8d
No known key found for this signature in database
GPG key ID: 583A612D890159BE
13 changed files with 73 additions and 35 deletions

View file

@ -12,6 +12,7 @@ import { ActorFollowModel } from '../actor/actor-follow.js'
import { ApplicationModel } from '../application/application.js'
import { PluginModel } from '../server/plugin.js'
import { SequelizeModel, throwIfNotValid } from '../shared/index.js'
import { getStateLabel } from '../video/formatter/video-api-format.js'
import { VideoBlacklistModel } from '../video/video-blacklist.js'
import { VideoCaptionModel } from '../video/video-caption.js'
import { VideoCommentModel } from '../video/video-comment.js'
@ -490,7 +491,11 @@ export class UserNotificationModel extends SequelizeModel<UserNotificationModel>
id: video.id,
uuid: video.uuid,
shortUUID: uuidToShort(video.uuid),
name: video.name
name: video.name,
state: {
id: video.state,
label: getStateLabel(video.state)
}
}
}
@ -500,12 +505,7 @@ export class UserNotificationModel extends SequelizeModel<UserNotificationModel>
threadId: abuse.VideoCommentAbuse.VideoComment.getThreadId(),
video: abuse.VideoCommentAbuse.VideoComment.Video
? {
id: abuse.VideoCommentAbuse.VideoComment.Video.id,
name: abuse.VideoCommentAbuse.VideoComment.Video.name,
shortUUID: uuidToShort(abuse.VideoCommentAbuse.VideoComment.Video.uuid),
uuid: abuse.VideoCommentAbuse.VideoComment.Video.uuid
}
? this.formatVideo(abuse.VideoCommentAbuse.VideoComment.Video)
: undefined
}
: undefined