Add playbooks product support.
Add new methods to post service
Этот коммит содержится в:
10
Makefile
10
Makefile
@@ -195,6 +195,16 @@ else
|
|||||||
IGNORE:=$(shell rm -f imports/boards_imports.go)
|
IGNORE:=$(shell rm -f imports/boards_imports.go)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# Playbooks
|
||||||
|
BUILD_PLAYBOOKS_DIR ?= ../mattermost-plugin-playbooks
|
||||||
|
BUILD_PLAYBOOKS ?= false
|
||||||
|
|
||||||
|
ifeq ($(BUILD_PLAYBOOKS),true)
|
||||||
|
IGNORE:=$(shell cp $(BUILD_PLAYBOOKS_DIR)/product/imports/playbooks_imports.go imports/)
|
||||||
|
else
|
||||||
|
IGNORE:=$(shell rm -f imports/playbooks_imports.go)
|
||||||
|
endif
|
||||||
|
|
||||||
all: run ## Alias for 'run'.
|
all: run ## Alias for 'run'.
|
||||||
|
|
||||||
-include config.override.mk
|
-include config.override.mk
|
||||||
|
|||||||
@@ -46,6 +46,14 @@ func (s *postServiceWrapper) CreatePost(ctx *request.Context, post *model.Post)
|
|||||||
return s.app.CreatePostMissingChannel(ctx, post, true)
|
return s.app.CreatePostMissingChannel(ctx, post, true)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *postServiceWrapper) GetPostsByIds(postIDs []string) ([]*model.Post, int64, *model.AppError) {
|
||||||
|
return s.app.GetPostsByIds(postIDs)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *postServiceWrapper) SendEphemeralPost(ctx *request.Context, userID string, post *model.Post) *model.Post {
|
||||||
|
return s.app.SendEphemeralPost(ctx, userID, post)
|
||||||
|
}
|
||||||
|
|
||||||
func (a *App) CreatePostAsUser(c request.CTX, post *model.Post, currentSessionId string, setOnline bool) (*model.Post, *model.AppError) {
|
func (a *App) CreatePostAsUser(c request.CTX, post *model.Post, currentSessionId string, setOnline bool) (*model.Post, *model.AppError) {
|
||||||
// Check that channel has not been deleted
|
// Check that channel has not been deleted
|
||||||
channel, errCh := a.Srv().Store().Channel().Get(post.ChannelId, true)
|
channel, errCh := a.Srv().Store().Channel().Get(post.ChannelId, true)
|
||||||
|
|||||||
@@ -31,6 +31,8 @@ type RouterService interface {
|
|||||||
// The service shall be registered via app.PostKey service key.
|
// The service shall be registered via app.PostKey service key.
|
||||||
type PostService interface {
|
type PostService interface {
|
||||||
CreatePost(context *request.Context, post *model.Post) (*model.Post, *model.AppError)
|
CreatePost(context *request.Context, post *model.Post) (*model.Post, *model.AppError)
|
||||||
|
GetPostsByIds(postIDs []string) ([]*model.Post, int64, *model.AppError)
|
||||||
|
SendEphemeralPost(ctx *request.Context, userID string, post *model.Post) *model.Post
|
||||||
}
|
}
|
||||||
|
|
||||||
// PermissionService provides permissions related utilities. For now, the service implementation
|
// PermissionService provides permissions related utilities. For now, the service implementation
|
||||||
|
|||||||
@@ -16,5 +16,6 @@ then
|
|||||||
txt="${txt}use ../focalboard/server\nuse ../focalboard/mattermost-plugin\n"
|
txt="${txt}use ../focalboard/server\nuse ../focalboard/mattermost-plugin\n"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
txt="${txt}use ../mattermost-plugin-playbooks\n"
|
||||||
printf "$txt" > "go.work"
|
printf "$txt" > "go.work"
|
||||||
fi
|
fi
|
||||||
Ссылка в новой задаче
Block a user