}
private async notifyOfCommentMention (comment: VideoCommentModel) {
- const usernames = comment.extractMentions()
- let users = await UserModel.listByUsernames(usernames)
+ const extractedUsernames = comment.extractMentions()
+ logger.debug(
+ 'Extracted %d username from comment %s.', extractedUsernames.length, comment.url,
+ { usernames: extractedUsernames, text: comment.text }
+ )
+
+ let users = await UserModel.listByUsernames(extractedUsernames)
if (comment.Video.isOwned()) {
const userException = await UserModel.loadByVideoId(comment.videoId)