diff options
author | Chocobozzz <me@florianbigard.com> | 2018-07-26 10:45:10 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-07-26 11:02:04 +0200 |
commit | 2cebd797014561ebc0bfee07ee8b5d83820adb66 (patch) | |
tree | fe912e29c7321c3c29e94691520615a741899e71 /server/models | |
parent | c1e791bad0b079af67398f6407221e6dcbb573dd (diff) | |
download | PeerTube-2cebd797014561ebc0bfee07ee8b5d83820adb66.tar.gz PeerTube-2cebd797014561ebc0bfee07ee8b5d83820adb66.tar.zst PeerTube-2cebd797014561ebc0bfee07ee8b5d83820adb66.zip |
Fix last commit
Diffstat (limited to 'server/models')
-rw-r--r-- | server/models/migrations/index.ts | 4 | ||||
-rw-r--r-- | server/models/utils.ts | 2 | ||||
-rw-r--r-- | server/models/video/video-comment.ts | 2 |
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 | ||
21 | export { | 25 | export { |
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 | ||
78 | function searchTrigramNormalizeValue (value: string) { | 78 | function 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 | ||
82 | function searchTrigramNormalizeCol (col: string) { | 82 | function 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 |