diff options
Diffstat (limited to 'plugin/hooks.go')
-rw-r--r-- | plugin/hooks.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/plugin/hooks.go b/plugin/hooks.go index c191652e3..363a69fc0 100644 --- a/plugin/hooks.go +++ b/plugin/hooks.go @@ -30,6 +30,8 @@ const ( UserHasLeftTeamId = 12 ChannelHasBeenCreatedId = 13 FileWillBeUploadedId = 14 + UserWillLogInId = 15 + UserHasLoggedInId = 16 TotalHooksId = iota ) @@ -119,6 +121,13 @@ type Hooks interface { // If actor is not nil, the user was removed from the team by the actor. UserHasLeftTeam(c *Context, teamMember *model.TeamMember, actor *model.User) + // UserWillLogIn before the login of the user is returned. Returning a non empty string will reject the login event. + // If you don't need to reject the login event, see UserHasLoggedIn + UserWillLogIn(c *Context, user *model.User) string + + // UserHasLoggedIn is invoked after a user has logged in. + UserHasLoggedIn(c *Context, user *model.User) + // FileWillBeUploaded is invoked when a file is uploaded, but before it is committed to backing store. // Read from file to retrieve the body of the uploaded file. You may modify the body of the file by writing to output. // Returned FileInfo will be used instead of input FileInfo. Return nil to reject the file upload and include a text reason as the second argument. |