summaryrefslogtreecommitdiffstats
path: root/app/plugin_api.go
diff options
context:
space:
mode:
authordmitrysamuylovpharo <dsamuylov@pharo.com>2018-08-02 10:37:31 -0400
committerHarrison Healey <harrisonmhealey@gmail.com>2018-08-02 10:37:31 -0400
commit7a731d2bd162419086f3aeec98ec41dfcaa16696 (patch)
treefb2dcfd52b5ee074c2ce9e3fbacefc3156c5bc75 /app/plugin_api.go
parentb728b16f9083bf5c71e9c27ad074823e8e454b04 (diff)
downloadchat-7a731d2bd162419086f3aeec98ec41dfcaa16696.tar.gz
chat-7a731d2bd162419086f3aeec98ec41dfcaa16696.tar.bz2
chat-7a731d2bd162419086f3aeec98ec41dfcaa16696.zip
Feature/fileinfo create copy (#9198)
* Initial implementation of a CopyFileInfos function that creates new FileInfo objects copied from provided FileIds with the provided user as the creator and not linked to a post yet. This can subsequently be used to copy existing attachments from another post to attach to a new post without having to re-upload the actual files * added a unit test for the CopyFileInfos function * resolving pull request suggestions
Diffstat (limited to 'app/plugin_api.go')
-rw-r--r--app/plugin_api.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/plugin_api.go b/app/plugin_api.go
index 31bfd401d..c3ab8fab2 100644
--- a/app/plugin_api.go
+++ b/app/plugin_api.go
@@ -275,6 +275,10 @@ func (api *PluginAPI) UpdatePost(post *model.Post) (*model.Post, *model.AppError
return api.app.UpdatePost(post, false)
}
+func (api *PluginAPI) CopyFileInfos(userId string, fileIds []string) ([]string, *model.AppError) {
+ return api.app.CopyFileInfos(userId, fileIds)
+}
+
func (api *PluginAPI) KVSet(key string, value []byte) *model.AppError {
return api.app.SetPluginKey(api.id, key, value)
}