* add cloud limit check

* add test

* add warning for the inaccessible root-post

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
Vishal
2023-05-03 16:12:57 +05:30
коммит произвёл GitHub
родитель f3131286af
Коммит 698613c002
2 изменённых файлов: 67 добавлений и 0 удалений

Просмотреть файл

@@ -1901,6 +1901,12 @@ func isCommentMention(user *model.User, post *model.Post, otherPosts map[string]
return mentioned
}
if _, ok := otherPosts[post.RootId]; !ok {
mlog.Warn("Can't determine the comment mentions as the rootPost is past the cloud plan's limit", mlog.String("rootPostID", post.RootId), mlog.String("commentID", post.Id))
return false
}
// Whether or not the user was mentioned because they started the thread
mentioned := otherPosts[post.RootId].UserId == user.Id