Adding 'MessageHasBeenDeleted' hook to plugins (#22476)
* Adding 'MessageHasBeenDeleted' hook to plugins * Remove debug logs * Add unit test * Bumping the required version * Fix CI problems * Increasing the minimum version * go fmt --------- Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com> Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
c731630e88
Коммит
17ff2049ec
@@ -52,6 +52,7 @@ const (
|
||||
ConfigurationWillBeSavedID = 34
|
||||
NotificationWillBePushedID = 35
|
||||
UserHasBeenDeactivatedID = 36
|
||||
MessageHasBeenDeletedID = 37
|
||||
TotalHooksID = iota
|
||||
)
|
||||
|
||||
@@ -169,6 +170,13 @@ type Hooks interface {
|
||||
// Minimum server version: 5.2
|
||||
MessageHasBeenUpdated(c *Context, newPost, oldPost *model.Post)
|
||||
|
||||
// MessageHasBeenDeleted is invoked after the message has been deleted from the database.
|
||||
// Note that this method will be called for posts deleted by plugins, including the plugin that
|
||||
// deleted the post.
|
||||
//
|
||||
// Minimum server version: 9.1
|
||||
MessageHasBeenDeleted(c *Context, post *model.Post)
|
||||
|
||||
// ChannelHasBeenCreated is invoked after the channel has been committed to the database.
|
||||
//
|
||||
// Minimum server version: 5.2
|
||||
|
||||
Ссылка в новой задаче
Block a user