aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-02-15 15:52:18 +0100
committerChocobozzz <me@florianbigard.com>2019-02-15 15:52:18 +0100
commit41d713446c2152d47943ddb0c841a9e36ca5a9db (patch)
tree7b22f6f7ea5652107ef503470d2455c4bb087799 /server/lib
parent17036be5bc2f14dc4e66053087e39887599df4de (diff)
downloadPeerTube-41d713446c2152d47943ddb0c841a9e36ca5a9db.tar.gz
PeerTube-41d713446c2152d47943ddb0c841a9e36ca5a9db.tar.zst
PeerTube-41d713446c2152d47943ddb0c841a9e36ca5a9db.zip
Lazy import some modules
Diffstat (limited to 'server/lib')
-rw-r--r--server/lib/notifier.ts9
1 files changed, 6 insertions, 3 deletions
diff --git a/server/lib/notifier.ts b/server/lib/notifier.ts
index 2fa320cd7..9cdd603a3 100644
--- a/server/lib/notifier.ts
+++ b/server/lib/notifier.ts
@@ -147,10 +147,13 @@ class Notifier {
147 } 147 }
148 148
149 private async notifyOfCommentMention (comment: VideoCommentModel) { 149 private async notifyOfCommentMention (comment: VideoCommentModel) {
150 const usernames = comment.extractMentions() 150 const extractedUsernames = comment.extractMentions()
151 logger.debug('Extracted %d username from comment %s.', usernames.length, comment.url, { usernames, text: comment.text }) 151 logger.debug(
152 'Extracted %d username from comment %s.', extractedUsernames.length, comment.url,
153 { usernames: extractedUsernames, text: comment.text }
154 )
152 155
153 let users = await UserModel.listByUsernames(usernames) 156 let users = await UserModel.listByUsernames(extractedUsernames)
154 157
155 if (comment.Video.isOwned()) { 158 if (comment.Video.isOwned()) {
156 const userException = await UserModel.loadByVideoId(comment.videoId) 159 const userException = await UserModel.loadByVideoId(comment.videoId)