коммит произвёл
Christopher Speller
родитель
08e54ed824
Коммит
d23ca07133
@@ -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.
|
||||
|
||||
Ссылка в новой задаче
Block a user