* Two missing methods to add in the channel layer * Added delete user/channel posts methods - Created in both search engines but only implemented in ES - Add those methods in the search layer - Included the PermanentDeleteByUser/Channel methods * Two new delete documents are included in the bleve code with this change: - DeleteChannelPosts - DeleteUserPosts These two new functions delete post documents from the index-based in the filed value provided
24 строки
517 B
Go
24 строки
517 B
Go
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
package bleveengine
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/mattermost/mattermost-server/v5/model"
|
|
)
|
|
|
|
func createPost(userId string, channelId string, message string) *model.Post {
|
|
post := &model.Post{
|
|
Message: message,
|
|
ChannelId: channelId,
|
|
PendingPostId: model.NewId() + ":" + fmt.Sprint(model.GetMillis()),
|
|
UserId: userId,
|
|
CreateAt: 1000000,
|
|
}
|
|
post.PreSave()
|
|
|
|
return post
|
|
}
|