ChannelStore migration Part 2 (#15405)
* Migration completed * Several corrections in tests * Fix imports * Fix some errors after testing * Trigger CI * Fix tests * Suggestions * Suggestions * Add license Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
7abc4f5383
Коммит
9ee9c78412
@@ -1292,12 +1292,12 @@ func (a *App) countMentionsFromPost(user *model.User, post *model.Post) (int, *m
|
||||
|
||||
if channel.Type == model.CHANNEL_DIRECT {
|
||||
// In a DM channel, every post made by the other user is a mention
|
||||
count, countErr := a.Srv().Store.Channel().CountPostsAfter(post.ChannelId, post.CreateAt-1, channel.GetOtherUserIdForDM(user.Id))
|
||||
if countErr != nil {
|
||||
return 0, countErr
|
||||
count, nErr := a.Srv().Store.Channel().CountPostsAfter(post.ChannelId, post.CreateAt-1, channel.GetOtherUserIdForDM(user.Id))
|
||||
if nErr != nil {
|
||||
return 0, model.NewAppError("countMentionsFromPost", "app.channel.count_posts_since.app_error", nil, nErr.Error(), http.StatusInternalServerError)
|
||||
}
|
||||
|
||||
return count, countErr
|
||||
return count, nil
|
||||
}
|
||||
|
||||
channelMember, err := a.GetChannelMember(channel.Id, user.Id)
|
||||
|
||||
Ссылка в новой задаче
Block a user