* 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>
Этот коммит содержится в:
Rodrigo Villablanca
2020-09-15 14:48:30 -03:00
коммит произвёл GitHub
родитель 7abc4f5383
Коммит 9ee9c78412
28 изменённых файлов: 1326 добавлений и 901 удалений

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

@@ -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)