aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models
diff options
context:
space:
mode:
Diffstat (limited to 'server/models')
-rw-r--r--server/models/migrations/index.ts4
-rw-r--r--server/models/utils.ts2
-rw-r--r--server/models/video/video-comment.ts2
3 files changed, 6 insertions, 2 deletions
diff --git a/server/models/migrations/index.ts b/server/models/migrations/index.ts
index c2b31b05e..24badb166 100644
--- a/server/models/migrations/index.ts
+++ b/server/models/migrations/index.ts
@@ -16,6 +16,10 @@ declare namespace Migration {
16 interface BigInteger extends Sequelize.DefineAttributeColumnOptions { 16 interface BigInteger extends Sequelize.DefineAttributeColumnOptions {
17 defaultValue: Sequelize.DataTypeBigInt | number | null 17 defaultValue: Sequelize.DataTypeBigInt | number | null
18 } 18 }
19
20 interface UUID extends Sequelize.DefineAttributeColumnOptions {
21 defaultValue: Sequelize.DataTypeUUIDv4 | null
22 }
19} 23}
20 24
21export { 25export {
diff --git a/server/models/utils.ts b/server/models/utils.ts
index 393f8f036..99e146583 100644
--- a/server/models/utils.ts
+++ b/server/models/utils.ts
@@ -76,7 +76,7 @@ export {
76// --------------------------------------------------------------------------- 76// ---------------------------------------------------------------------------
77 77
78function searchTrigramNormalizeValue (value: string) { 78function searchTrigramNormalizeValue (value: string) {
79 return Sequelize.fn('lower', Sequelize.fn('unaccent', value)) 79 return Sequelize.fn('lower', Sequelize.fn('immutable_unaccent', value))
80} 80}
81 81
82function searchTrigramNormalizeCol (col: string) { 82function searchTrigramNormalizeCol (col: string) {
diff --git a/server/models/video/video-comment.ts b/server/models/video/video-comment.ts
index 03122dc03..f84c1880c 100644
--- a/server/models/video/video-comment.ts
+++ b/server/models/video/video-comment.ts
@@ -417,7 +417,7 @@ export class VideoCommentModel extends Model<VideoCommentModel> {
417 toActivityPubObject (threadParentComments: VideoCommentModel[]): VideoCommentObject { 417 toActivityPubObject (threadParentComments: VideoCommentModel[]): VideoCommentObject {
418 let inReplyTo: string 418 let inReplyTo: string
419 // New thread, so in AS we reply to the video 419 // New thread, so in AS we reply to the video
420 if ((this.inReplyToCommentId !== null) || (this.InReplyToVideoComment !== null)) { 420 if (this.inReplyToCommentId === null) {
421 inReplyTo = this.Video.url 421 inReplyTo = this.Video.url
422 } else { 422 } else {
423 inReplyTo = this.InReplyToVideoComment.url 423 inReplyTo = this.InReplyToVideoComment.url